Using lvm only on specific drives (Reading all physical volumes. This may take a while…)
To fix this i restricted lvm to only use sda (documented in lvm.conf). If you are stuck at the vgscan stage
Reading all physical volumes. This may take a while…
Then you probably need to do something similar to this.
The filter line is the important one. After that you’ll need to rebuild initrd to pickup the modified lvm.conf. I usually cheat and use the kernel’s method for that.
devices {
dir = "/dev"
scan = [ "/dev" ]
preferred_names = [ ]
filter = [ "a|/dev/sda.*|", "r|.*|" ]
}
Hope that helps.
[root@server0 lvm]# rpm -q kernel --scripts |grep mkinitrd
/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 2.6.18-128.1.16.el5 || exit $?
[root@server0 lvm]#



July 27th, 2009 at 10:38 pm
Hi!
I am using Debian … it looks like the vgscan is issued in /etc/init.d/lvm2. Do you have any idea if I also have to update the initramfs?
Alex
July 28th, 2009 at 4:42 am
Our systems are RedHat/Fedora/Centos based, the vgscan is issued from the initrd on our distro, so it should be in the initramfs on yours. This is because the system needs to do the vgscan to find the lvm’s and mount ‘/’ before it can read ‘/etc/init.d/lvm2′. On our system the /etc/lvm/lvm.conf is picked up by the call to mkinitrd, I assume something similar will happen on debian (I don’t know much about debian, sorry), maybe check how the system updates itself after a kernel upgrade.