Thank you for the great hints! Setting the following in container’s /etc/lvm/lvm.conf solved part of the problem and can be used for future reference for everyone else that stumbles upon this:
udev_rules = 0
In this way LVM will handle the nodes internally and the above command will work but only sometimes. The actual output of the command changes to
$ lvcreate -L 30G --thin ramdisk_vm1/thin_pool
setpriority -18 failed: Permission denied
Aborting. Failed to wipe start of new LV.
setpriority -18 failed: Permission denied
The area around the setpriority -18 failed: Permission denied
messages shows through strace
getpriority(PRIO_PROCESS, 0) = 20
setpriority(PRIO_PROCESS, 0, -18) = -1 EACCES (Permission denied)
write(2, " ", 2) = 2
write(2, "setpriority -18 failed: Permissi"..., 41) = 41
write(2, "\n", 1) = 1
The process is trying to increase its priority from 20 to -18 and is denied this. Changing the setting
process_priority = -18
to 0 removed these messages although it is not something preferable and the error reduces to
$ lvcreate -L 30G --thin _vm1_ramdisk/thin_pool
File descriptor 6 (anon_inode:[signalfd]) leaked on lvcreate invocation. Parent PID 5: /bin/bash
Aborting. Failed to wipe start of new LV.
which then can be straced to
stat("/dev/_vm1_ramdisk", 0x7ffec8b62a70) = -1 ENOENT (No such file or directory)
umask(022) = 077
mkdir("/dev/_vm1_ramdisk", 0777) = 0
umask(077) = 022
lstat("/dev/_vm1_ramdisk/group", 0x7ffec8b629b0) = -1 ENOENT (No such file or directory)
lstat("/dev/_vm1_ramdisk/lvol0", 0x7ffec8b629b0) = -1 ENOENT (No such file or directory)
symlink("/dev/mapper/_vm1_ramdisk-lvol0", "/dev/_vm1_ramdisk/lvol0") = 0
stat("/dev/mapper/control", {st_mode=S_IFCHR|0600, st_rdev=makedev(10, 236), ...}) = 0
open("/dev/mapper/control", O_RDWR) = 4
ioctl(4, DM_DEV_STATUS, {version=4.0.0, data_size=16384, uuid="LVM-dtzs1fKrihUVQwkanojDA6UxNPSArz0Y8eAhnUpRh57aDe7zOs4PqfvqWxSd9Fo2", flags=DM_EXISTS_FLAG|DM_SKIP_BDGET_FLAG} => {version=4.33.0, data_size=312, dev=makedev(253, 8), name="_vm1_ramdisk-lvol0", uuid="LVM-dtzs1fKrihUVQwkanojDA6UxNPSArz0Y8eAhnUpRh57aDe7zOs4PqfvqWxSd9Fo2", target_count=1, open_count=0, event_nr=0, flags=DM_EXISTS_FLAG|DM_ACTIVE_PRESENT_FLAG|DM_SKIP_BDGET_FLAG}) = 0
stat("/dev/_vm1_ramdisk/lvol0", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 8), ...}) = 0
stat("/dev/_vm1_ramdisk/lvol0", {st_mode=S_IFBLK|0660, st_rdev=makedev(253, 8), ...}) = 0
open("/dev/_vm1_ramdisk/lvol0", O_RDWR|O_DIRECT|O_NOATIME) = -1 EPERM (Operation not permitted)
open("/dev/_vm1_ramdisk/lvol0", O_RDWR|O_DIRECT) = -1 EPERM (Operation not permitted)
open("/dev/_vm1_ramdisk/lvol0", O_RDWR) = -1 EPERM (Operation not permitted)
write(2, " ", 2 ) = 2
write(2, "Aborting. Failed to wipe start o"..., 41Aborting. Failed to wipe start of new LV.) = 41
write(2, "\n", 1
) = 1
There is some additional permission issue that i still can’t find after going through the config.