boot time assembly of raid arrays

Mark J Strawcutter mjstraw at iup.edu
Wed Oct 19 18:27:28 UTC 2005


>> rhel4
>> 
>> I've tried using combinations of md= and raid=noautodetect kernel parameters
>> along with settings in /etc/mdadm.conf in an attempt to influence what devices/partitions
>> get assembled into md3 at boot time.
>> 
>> So far, no luck.
>> 
>> md3 is root.  The correct level-1 array should be sda3 and sdc3.  However, sdd3
>> has raid superblock left on it from previous use with preferred minor=3
>> 
>> It appears that something starts looking at the last/highest disk's partitions and works
>> down.  It builds md3 from sdd3 then rejects sdc3 and sda3 as not matching.
>> 
>> Tried device and uuid options in md= and mdadm.conf but it doesn't help.
>> 
>> Is there something else that influences how raid arrays are assembled at boot time?
> 
> A normal SCSI scan starts from device 7 (or 15 on wide SCSI) and works
> its way down in Linux.

And with multiple adapters, it appears to start with 1 then goes to 0
 
> Have you tried adding a line such as:
> 
> ARRAY /dev/md3 devices=/dev/sda3,/dev/sdc3 uuid=whatever
> 
> to your mdadm.conf file?

yes - didn't help
 
> How about destroying the RAID superblock on /dev/sdd3 via
> 
> mdadm --zero-superblock --force /dev/sdd3
> 
> and then mdadm can't do anything with it even if it wanted to (well,
> unless you tell it to do a legacy MD array, then all bets are off).

That operation executes without error, and subsequent mdadm query
says no superblock, but when it's unmounted at shutdown time the
superblock gets re-written.

Fortunately, I had available 1) a virgin disk and 2) drives are hot-swappable.
Booted with the virgin disk installed so the device got recognized/created.
Hot-swapped to the problem disk.  Couldn't zero the superblock - just reported
a bunch of I/O errors.  Ended up using sfdisk (had to -f it) to partition into a single
partition.

If I didn't have a spare disk, or if the hardware didn't allow hot swap, I'd have been
out of luck.  Thats why I'd really like to solve this - so I can recover more easily if/when
it happens again.

Mark




More information about the Redhat-install-list mailing list