Bug 141945 - booting with root on lvm2 over raid5
Summary: booting with root on lvm2 over raid5
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Alpha 4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Hannes Reinecke
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-07 13:38 UTC by Robert Valentan
Modified: 2006-01-17 14:00 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Valentan 2006-01-07 13:38:49 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 ----------------------------
~                                                                               
~                                                                               
~                                                                               
~
Comment 1 Thomas Fehr 2006-01-09 13:46:34 UTC
Hannes, you are the Guru about initrd, could it be possible that lvm on raid5
was never working with our initrd in 10.1?
Comment 2 Hannes Reinecke 2006-01-09 14:13:29 UTC
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 ...
Comment 3 Hannes Reinecke 2006-01-09 14:15:56 UTC
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.
Comment 4 Thomas Fehr 2006-01-09 14:32:11 UTC
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.
Comment 5 Hannes Reinecke 2006-01-17 14:00:37 UTC
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.