Bug 68959

Summary: /dev/md[1-9] device files missing from initrd when required to mount LVM root partition
Product: [Retired] Red Hat Raw Hide Reporter: Robert Clark <robert3>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: harald
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-07-17 02:38:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 67217    
Attachments:
Description Flags
Patch against mkinitrd 3.4.13 to allow detection of md PVs none

Description Robert Clark 2002-07-16 15:28:33 UTC
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):
mkinitrd-3.4.14-1

How Reproducible:
Always

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

Actual Results:
vgscan does not detect /dev/md1 as a PV.
vgchange does not activate the VG.
mounting root fails and the kernel panics

Expected Results:
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.

Additional Information:
Manually adding the missing /dev/md1 device file to the initrd allows the boot
to succeed.

If the root parition only requires /dev/md0, it suceeds, since /dev/md0 is added
for raidautorun.

Comment 1 Robert Clark 2002-07-16 15:31:29 UTC
Created attachment 65544 [details]
Patch against mkinitrd 3.4.13 to allow detection of md PVs

Comment 2 Robert Clark 2002-07-16 15:37:42 UTC
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
fine, though.

Comment 3 Erik Troan 2002-07-24 15:59:57 UTC
should be fixed in mkinitrd-3.4.17