Bug 142703

Summary: raid modules are not included
Product: Red Hat Enterprise Linux 2.1 Reporter: Takayoshi Kochi <t-kochi>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-12-14 01:53:35 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 Takayoshi Kochi 2004-12-13 03:00:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0

Description of problem:
When RAID0 or RAID1 is configured on a system,
the mkinitrd is expected to include raid modules in initrd
and enable autodetection/autoconfiguration of raid devices.

Sometimes it fails to include raid*.o modules depending on
how /etc/raidtab is written.

On AS2.1, mkinitrd checks /etc/raidtab to see what level of raid
is used on a system.  It is done on line 378,

for number in $(grep '^[	]*raid-level' /etc/raidtab 2>/dev/null |
		  awk '{print $2}' | LC_ALL=C sort -u) ; do

In the first argument of grep, characters surrounded by brackets
are expected to be [<SPACE><TAB>] but actually it only contains <TAB>.

If the 'raid-level' lines in /etc/raidtab is indented with
<SPACE>, mkinitrd fails to include the raid module of that level.

When components of a raid array are renamed
(e.g. /dev/sdd + /dev/sde  => /dev/sde + /dev/sdf),
the boot procedure fails to reconstruct the raid array.

To workaround this, permit <TAB> only in /etc/raidtab.

Version-Release number of selected component (if applicable):
mkinitrd-3.4.24-0.ia64.4

How reproducible:
Always

Steps to Reproduce:
1. write /etc/raidtab indented with space
2. start and use raid (on ia64, set raid flag on those partitions with
parted)
3. remake initrd
4. reboot with some changes of ordering and position of the components
of the array

Actual Results:  RAID reconfiguration fails.

Expected Results:  RAID reconfiguration succeeds.

Additional info:

Comment 1 Jeremy Katz 2004-12-14 01:53:35 UTC
We require the raidtab to be written with tabs instead of spaces.