[CentOS] Autodetecing RAID members upon boot... need to update initrd?

Tim Nelson

tnelson at rockbochs.com
Mon Nov 10 19:50:57 UTC 2008


Hello fellow CentOS'ers-

I've got a system running CentOS 5.0. The motherboard has two onboard SATA ports with two drives attached. I installed the system on a RAID1 setup. However, I'd like to add a hotspare disk to the array. Since there are no additional SATA ports, I've installed an additional controller. After partitioning, the additional drive was easily and successfully added to the existing array as a spare. However, the problem is when the system boots. The hotspare disk is never detected and added to the array. I believe it could be due to the driver for the addon card not being in the initrd?

If I run 'fdisk -l', I see this:

---BEGIN---
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   fd  Linux raid autodetect
/dev/sda2              14         523     4096575   fd  Linux raid autodetect
/dev/sda3             524       60801   484183035   fd  Linux raid autodetect

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdb2              14         523     4096575   fd  Linux raid autodetect
/dev/sdb3             524       60801   484183035   fd  Linux raid autodetect

Disk /dev/md2: 495.8 GB, 495803301888 bytes
2 heads, 4 sectors/track, 121045728 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/md1: 12.5 GB, 12584288256 bytes
2 heads, 4 sectors/track, 3072336 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md0: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          13      104391   fd  Linux raid autodetect
/dev/sdc2              14         523     4096575   fd  Linux raid autodetect
/dev/sdc3             524       60801   484183035   fd  Linux raid autodetect
---END---

If my assumptions are correct, the onboard drives are detected first, then the arrays assembled, and after the system has passed control from the initrd to boot, THEN the addon controller is detected and hence the third drive (sdc). If I am correct, then I need to update my initrd for the system to see and use that third drive during the boot process. Can anyone lend a few tips or pointers on how to proceed? I essentially need the sata_sil driver to be included in the initrd.

All tips welcome. Thank you!

Tim Nelson
Systems/Network Support
Rockbochs Inc.
(218)727-4332 x105



More information about the CentOS mailing list