Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 4 product line. The current stable release is 4.9. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 159795

Summary: rc.sysinit doesn't handle LVM2 on top of RAID correctly
Product: Red Hat Enterprise Linux 4 Reporter: Ben Whaley <ben>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED DUPLICATE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: 4.0CC: rvokal
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: 2005-06-08 15:24:31 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:

Description Ben Whaley 2005-06-08 02:24:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

Description of problem:
rc.sysinit supports LVM2 on top RAID, but only when using /etc/raidtab, not with /etc/mdadm.conf. 

Version-Release number of selected component (if applicable):
initscripts-7.93.11.EL-1

How reproducible:
Always

Steps to Reproduce:
1. Build a RAID array with mdadm. Make a configuration file (usually /etc/mdadm.conf).
2. Use LVM2 tools to create a volume group and logical volumes, using the RAID device created in step 1.
3. Add the LV's to fstab and reboot. The partitions will not fsck, and the system may hang.
  

Actual Results:  I saw varying behavior. Sometimes the system would hang and force a disk check with the following message:

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.

Other times the disk check would fail but the system would continue to boot.

Expected Results:  The partitions should have been successfully mounted.

Additional info:

The problem is that LVM2 is initialized before mdadm has a chance to activate any existing RAID partitions. The following (from rc.sysinit) will successfully start the RAID subsystem:

update_boot_stage RCraid
if [ -f /etc/mdadm.conf ]; then
    /sbin/mdadm -A -s
fi

but at that point LVM2 had already been initialized, and since the RAID device had not yet been started it LVM could not start those volume groups. To fix the problem, I simply move the code quoted above to just before the "# LVM2 initialization" comment.

I'm setting this to High because it destroyed an ext3 partition I had created.

Comment 3 Bill Nottingham 2005-06-08 15:24:31 UTC

*** This bug has been marked as a duplicate of 149812 ***