Red Hat Bugzilla – Bug 68959
/dev/md[1-9] device files missing from initrd when required to mount LVM root partition
Last modified: 2007-04-18 12:44:13 EDT
Description of Problem:
When root is a logical volume from a volume group made up of md devices, the
required md device files are missing from the initrd.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create 2 md arrays
2. Make the second a PV and add it to a new VG.
3. Create a new LV on that VG with a root filesystem on it.
4. Adjust fstab to mount the new LV as root.
5. run mkinitrd
6. try to boot with the new initrd
vgscan does not detect /dev/md1 as a PV.
vgchange does not activate the VG.
mounting root fails and the kernel panics
vgscan should recognise /dev/md1 as a PV and detect the new VG.
vgchange should activate the VG.
The real root should be mounted and init run.
Manually adding the missing /dev/md1 device file to the initrd allows the boot
If the root parition only requires /dev/md0, it suceeds, since /dev/md0 is added
Created attachment 65544 [details]
Patch against mkinitrd 3.4.13 to allow detection of md PVs
The patch switches mkinitrd to use pvscan instead of lvmdiskscan for the
detection of PVs.
Sample output from lvmdiskscan:
lvmdiskscan -- /dev/md0 [ 25 MB] free meta device
lvmdiskscan -- /dev/md1 [ 74.50 GB] free meta device
lvmdiskscan -- /dev/hdg1 [ 25.07 MB] Primary [0xFD]
lvmdiskscan -- /dev/hdg2 [ 37.25 GB] Primary [0xFD]
lvmdiskscan -- /dev/hde1 [ 25.07 MB] Primary [0xFD]
lvmdiskscan -- /dev/hde2 [ 37.25 GB] Primary [0xFD]
lvmdiskscan -- /dev/hdc1 [ 25.07 MB] Primary [0xFD]
lvmdiskscan -- /dev/hdc2 [ 37.25 GB] Primary [0xFD]
Sample output from pvscan:
pvscan -- ACTIVE PV "/dev/md1" of VG "lvm-lexington" [74.49 GB / 65.99 GB free]
It looks like lvmdiskscan doesn't indicate which meta devices are PVs and which
aren't (/dev/md1 is a PV, /dev/md0 isn't in this case). pvscan seems to work
should be fixed in mkinitrd-3.4.17