[systemd-devel] machinectl remove always fails with "Device or resource busy"
Lennart Poettering
lennart at poettering.net
Sun May 1 18:56:16 UTC 2016
On Sat, 30.04.16 23:59, BenoƮt Zugmeyer (benoit at zugmeyer.com) wrote:
> Hi list,
>
> I'm experimenting with machinectl/nspawn to deploy multiple webservices on
> a single host. I have some trouble to remove unused images. Here is what
> I'm trying to do:
>
> # machinectl terminate preprod
>
> # machinectl list
> MACHINE CLASS SERVICE
>
> 0 machines listed.
>
> # machinectl list-images
> NAME TYPE RO USAGE CREATED MODIFIED
> preprod subvolume no 516.9M Sat 2016-04-30 21:30:06 CEST n/a
> preprod2 subvolume no 470.5M Sat 2016-04-30 22:33:53 CEST n/a
> preprod3 subvolume no 486.6M Sat 2016-04-30 23:04:22 CEST n/a
>
> 3 images listed.
>
> # machinectl remove preprod
> Could not remove image: Device or resource busy
>
> # systemctl restart /var/lib/machines
>
> # machinectl remove preprod
> Could not remove image: Device or resource busy
>
> I've got this error even after (physically) rebooting the host.
>
> I tried searching the Web to find some resources, but the only related
> result I can find is a bug report about disk quota[1], but I don't have any
> issue about disk quota.
>
> Is it a known issue? is there any tool to help me diagnose this? I tried
> toying around with lsof and fuser but without any success, but I am not an
> expert.
No this issue has not been reported yet.
Could you please file an issue on systemd github, and include the
output "strace -f -s500 -p $PID -o log" generates in the file called
"log" while you issue a single "remove" call like this? Replace $PID
by the PID of the machined process. Invoke this strace command
immediately before you run the machinectl remove command, from a
different window, and then terminate the strace invocation with
Ctrl-C after the machinectl command failed. Then attach the contents
of said "log" file, it should tell us why the image is considered busy.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list