Bugzilla – Bug 141945
booting with root on lvm2 over raid5
Last modified: 2006-01-17 14:00:37 UTC
Currently is it not possible to boot with a root on a lvm on raid5. (4 Disks in raid5, this raid is under control of lvm, with root-partition on lvm) With the following patch i can boot my system: ---------- begin patch ---------------------------- *** mkinitrd.orig Sat Jan 7 14:23:54 2006 --- mkinitrd Sat Jan 7 14:23:54 2006 *************** *** 2029,2035 **** | fi | sleep 1 | echo -n "." ! | [ -n "$vg" ] && vgchange -a y $vg | [ -n "$rootdevid" ] && /sbin/multipath -v0 | timeout=$(( $timeout - 1 )) | done --- 2029,2036 ---- | fi | sleep 1 | echo -n "." ! | [ -n "$vg" ] && vgscan --ignorelockingfailure ! | [ -n "$vg" ] && vgchange -ay --ignorelockingfailure | [ -n "$rootdevid" ] && /sbin/multipath -v0 | timeout=$(( $timeout - 1 )) | done *************** *** 2184,2194 **** |if [ -f /sys/module/md_mod/parameters/start_ro ]; then | # maybe should switch all arrays to rw/ but not really necessary | echo 0 > /sys/module/md_mod/parameters/start_ro ! |else | echo "raidautorun ..." | raidautorun | echo "done..." - |fi EOF fi --- 2185,2194 ---- |if [ -f /sys/module/md_mod/parameters/start_ro ]; then | # maybe should switch all arrays to rw/ but not really necessary | echo 0 > /sys/module/md_mod/parameters/start_ro ! |fi |echo "raidautorun ..." |raidautorun |echo "done..." EOF fi ---------- end patch ---------------------------- ~ ~ ~ ~
Hannes, you are the Guru about initrd, could it be possible that lvm on raid5 was never working with our initrd in 10.1?
could well be. I wouldn't wonder. But as the original patch (with the start_ro bit) came from neil brown himself I thought it would be okay ...
Still curious about the vgscan thing; someone told me that vgscan shouldn't be needed anymore with LVM2 ... but of course it shouldn't harm to do it anyway. Well, apart from an increased booting time, of course.
AFAIK the commands are smart enough to internally do the same as vgscan if there is no file /etc/lvm/.cache present. But this does not decrease boot time measurably, since it does not matter if the time consuming disk scanning is done by vgscan process or by vgchange process. Ok, you save one external command but no relevant time and if you have vgscan as a separate command you can more easily add options to it for debugging purposes.
So, I've updated mkinitrd to handle lvm & mdraid properly. I hope. Please re-test with Beta1 and re-open this bugzilla if the problem persists.