[Bug 113515] Re: Omits /etc/lvm/lvm.conf

Paul McEnery pmcenery at gmail.com
Tue May 27 10:29:40 UTC 2008


I can confirm this bug.

I run a configuration where a physical volume is the low level device
for DRBD. I then use LVM2 to carve up the DRBD disk and present iSCSI
LUN's to other systems. In order to get DRBD to start up, there must be
no other processes or volumes started on the DRBD low level device. LVM
filters are successful in keeping LVM away from the DRBD low level
device while the operating system is running, but not when the system
boots. The initramfs activates all volume groups it can find. This is
not appropriate behaviour. ONLY the volume group required to boot the
system should be activated (in my view anyway).

To get around this, I have extracted the initramfs and patched the udev
rules to only activate my volume group which is required to boot the
system:

====================================================
--- etc/udev/rules.d/85-lvm2.rules.bak  2008-05-27 11:06:27.000000000 +0100
+++ etc/udev/rules.d/85-lvm2.rules      2008-05-27 11:07:04.000000000 +0100
@@ -3,4 +3,4 @@
 # See udev(8) for syntax

 SUBSYSTEM=="block", ACTION=="add|change", ENV{ID_FS_TYPE}=="lvm*|LVM*", \
-       RUN+="watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y'"
+       RUN+="watershed sh -c '/sbin/lvm vgscan; /sbin/lvm vgchange -a y rootvg'"
====================================================

Not that I believe the above to be a fix, I do believe that there should
be more control over the volume groups that are activated at boot.
Obeying /etc/lvm/lvm.conf is one way to do it. I tried copying this file
into the initramfs, but it didn't work as my filters were filtering out
/dev/disk-by-uuid/*.

I see that this has also been flagged upstream:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474217

-- 
Omits /etc/lvm/lvm.conf
https://bugs.launchpad.net/bugs/113515
You received this bug notification because you are a member of Kernel
Bugs, which is subscribed to initramfs-tools in ubuntu.




More information about the kernel-bugs mailing list