What steps did you take and what happened:
In fact, it's not a bug.
Now lvm-drvier image uses Alpine as base image. In my project , I have to use other os image as base image(such as CentOS, OpenEuler). After installing some software(lvm2, device mapper, util-linux), but I can't create logic volume successfully.
What did you expect to happen:
Logic volume can be successfully created.
The output of the following commands will help us better understand what's going on:
In the lvm-driver container, I use lvcreate command to create logic volume, but error occurs:
# lvcreate -y -L 4M lvmvg -n test1
/dev/lvmvg/test1: not found: device not cleared
Aborting. Failed to wipe start of new LV.
I add -vvv to the lvcreate command, the detail log shows as following :
Udev is not running. Not using udev synchronisation code.
As a result, I get two method to create lv in CentOS base image.
Method 1: Run udev command in container, then I can create a lv.
Method 2: In container, in the file /etc/lvm/lvm.conf set udev_sync and udev_rules to 0, then I can create a lv.
However, I'm not sure whether these two methods have any potential risks.
My question is:
Udev it not running in Alpine container, udev_sync and udev_rules is also set to 1, why lv can be created successfully?
What steps did you take and what happened: In fact, it's not a bug.
Now lvm-drvier image uses Alpine as base image. In my project , I have to use other os image as base image(such as CentOS, OpenEuler). After installing some software(lvm2, device mapper, util-linux), but I can't create logic volume successfully.
What did you expect to happen: Logic volume can be successfully created.
The output of the following commands will help us better understand what's going on: In the lvm-driver container, I use lvcreate command to create logic volume, but error occurs:
I add -vvv to the lvcreate command, the detail log shows as following :
As a result, I get two method to create lv in CentOS base image.
However, I'm not sure whether these two methods have any potential risks.
My question is: Udev it not running in Alpine container, udev_sync and udev_rules is also set to 1, why lv can be created successfully?