Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change lvm-driver's base image to CentOS, logic volume can't be created successfully. #301

Closed
styshoo opened this issue May 8, 2024 · 0 comments

Comments

@styshoo
Copy link

styshoo commented May 8, 2024

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?

@styshoo styshoo closed this as completed May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant