I run a container. It has all the capabilities and mounts all the directories from root (except /proc
). When I call lvcreate
from inside of it I get:
# lvcreate -v -L104857600B -n vol1 default
Finding volume group "default"
Archiving volume group "default" metadata (seqno 17).
Creating logical volume vol1
Creating volume group backup "/etc/lvm/backup/default" (seqno 18).
Activating logical volume "vol1".
activation/volume_list configuration setting not defined: Checking only host tags for default/vol1
Creating default-vol1
Loading default-vol1 table (252:4)
Resuming default-vol1 (252:4)
And the command hangs. I also get this in logs:
Sep 12 12:03:31 node3 systemd-udevd[12529]: Process '/sbin/dmsetup udevcomplete 23072978' failed with exit code 1
If I interrupt it with ctrl-C I set, that the logical volume was created. I can also interrupt the command by issuing dmsetup udevcomplete_all
from inside the same container. If I call lvcreate
on the host it works normally and exits cleanly.
I believe, that this problem has something to do with udev cookies not being shared between container and host. I have no idea however, what exactly is lvm trying to do here and how to fix the problem.
I need this so that containerised kubelet can call flexvolume plugin that would be able to allocate logical volumes.