Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   Autodetecing RAID members upon boot... need to update initrd? (http://www.linux-archive.org/centos/191114-autodetecing-raid-members-upon-boot-need-update-initrd.html)

Tim Nelson 11-10-2008 06:50 PM

Autodetecing RAID members upon boot... need to update initrd?
 
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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Tim Nelson 11-10-2008 07:51 PM

Autodetecing RAID members upon boot... need to update initrd?
 
I wanted to MaKe and INITRD and you sent me to check out MKINITRD. How thoughtful... :-)

Kidding aside, I appreciate the suggestion. I checked it out and simply ran a 'mkinitrd --with=sata_sil /path/to/newinitrd <kernel>' and rebooted. When grub popped up, I edited the initrd line to reflect the new initrd. It worked like a charm. I've since updated the grub.conf permanently and everything works as expected when rebooted.

Thanks again for the pointers.

In the future, when upgrading the kernel, will future initrd's be built with my current modules or will I have to manually create new initrd's after each update?

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

----- "nate" <centos@linuxpowered.net> wrote:

> Tim Nelson wrote:
>
> > 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.
>
>
> Check the man page for mkinitrd, it's pretty self explanatory. I
> suggest
> you back up the existing initrd first, just in case there's a
> problem.
>
> nate
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Joseph L. Casale" 11-10-2008 09:13 PM

Autodetecing RAID members upon boot... need to update initrd?
 
>In the future, when upgrading the kernel, will future initrd's be built with my current modules or will I have to manually create new initrd's after each update?

Good question that I would love to know as well. I thought /etc/sysconfig/mkinitrd handled
this, but not ripping apart the srpm of a new kernel, I don’t really know if it bothers doing
making the initrd.

jlc
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Ross Walker 11-11-2008 10:38 PM

Autodetecing RAID members upon boot... need to update initrd?
 
On Nov 10, 2008, at 5:13 PM, "Joseph L. Casale" <JCasale@activenetwerx.com
> wrote:


In the future, when upgrading the kernel, will future initrd's be
built with my current modules or will I have to manually create new
initrd's after each update?


Good question that I would love to know as well. I thought /etc/
sysconfig/mkinitrd handled
this, but not ripping apart the srpm of a new kernel, I don’t really
know if it bothers doing

making the initrd.


Last step of the kernel rpm install script is to generate an initrd
file, so as long as your scsi_adapter order in your modprobe.conf is
right your initrds should be right.


If you need a special adapter loaded before the SCSI adapters then
there are preload options that can be set in /etc/sysconfig/initrd.


-Ross

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 04:23 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.