SCIENTIFIC-LINUX-USERS Archives

March 2005

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ryan Enge <[log in to unmask]>
Reply To:
Ryan Enge <[log in to unmask]>
Date:
Mon, 21 Mar 2005 21:16:26 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (92 lines)
Hi Daniel,

I had a problem with the software RAID autodetection under RHEL 3 (U1-2) which 
should be identical to SL (3.0.1 and 3.0.2) this problem has disappeared in 
later updates. The problem I had was that the md autodetection was running 
prior to the loading of the RAID card, so no drives were autodetected. I 
worked around this issue by setting up the /etc/mdadm.conf and then I added 
"mdadm -A /dev/md0" to rc.local. It seems that the more recent updates RHEL 3 
U4  (SL 3.0.4) has fixed this issue and I no longer need to manually start the 
array from rc.local provided my partitions are set to FD (Linux raid 
autodetect). On boot you should see messages like this:

md: Autodetecting RAID arrays
md: autorun ...
md: considering sdh1 ...
md:  adding sdh1 ...
md:  adding sdg1 ...
md:  adding sdf1 ...
md:  adding sde1 ...
md:  adding sdd1 ...
md:  adding sdc1 ...
md:  adding sda1 ...
md: created md0
md: bind<sda1,1>
md: bind<sdc1,2>
md: bind<sdd1,3>
md: bind<sde1,4>
md: bind<sdf1,5>
md: bind<sdg1,6>
md: bind<sdh1,7>
md: running: <sdh1><sdg1><sdf1><sde1><sdd1><sdc1><sda1>
md: sdh1's event counter: 0000007d
md: sdg1's event counter: 0000007d
md: sdf1's event counter: 0000007d
md: sde1's event counter: 0000007d
md: sdd1's event counter: 0000007d
md: sdc1's event counter: 0000007d
md: sda1's event counter: 0000007d
md0: removing former faulty sdb1!
md0: max total readahead window set to 3072k
md0: 6 data-disks, max readahead per data-disk: 512k
raid5: device sdh1 operational as raid disk 4
raid5: device sdg1 operational as raid disk 6
raid5: device sdf1 operational as raid disk 2
raid5: device sde1 operational as raid disk 3
raid5: device sdd1 operational as raid disk 1
raid5: device sdc1 operational as raid disk 5
raid5: device sda1 operational as raid disk 0
raid5: allocated 7504kB for md0
raid5: raid level 5 set md0 active with 7 out of 7 devices, algorithm 2

After this point the RAID array should be started and doing a "cat 
/proc/mdstat" should give you the status of the array. If the array is not 
automatically started, use dmesg and look for the "md" lines and note if they 
are before or after your RAID card is loaded.

Regards,
Ryan Enge
System Admin
UVic Physics & Astronomy
[log in to unmask]

>===== Original Message From Daniel Widyono <[log in to unmask]> =====
>> which you can maintain using
>> 	mdadm --detail --scan >> /etc/dadm.conf
>
>I assume you mean mdadm.conf?  Yup, we already have that and everything's
>working "normally", except we have to manually start raid at boot time.
>
>> and with the right option in /etc/fstab it would be mounted.
>
>Didn't check that, but in my recollection /etc/fstab only contains the md
>device to mount.  The md device needs to be set up by mdadm before it can be
>mounted, hence mdadm and/or raidstart need to run in rc.sysinit.
>
>> I didn't do that yet, so i was surprised to see that one seems
>> to have to run
>> 	mdadm --create .....
>> each time before /dev/md0 is in the correct shape so you can mount
>> it again.
>
>I don't think so; you --create the first time, and from then on you
>mdadm --assemble --scan.
>
>I suppose I'll set up a mini-HOWTO for this, if I don't find any others.
>I've seen a few posts via google which point to patching rc.sysinit to check
>for /etc/mdadm.conf and setting up raid via mdadm if it exists.  Thus, I
>believe I was on the right track.
>
>Good luck,
>Dan W.

ATOM RSS1 RSS2