PDA

View Full Version : Need help adding SATA drive



Don-B
18th October 2009, 06:19 AM
I have a working F-10 box with an older motherboard (pre-sata). The p-ata ports are full (4 drives), so I'm trying to add a sata controller and another drive. The sata controller plugs into the pci bus, but is not detected by the bios (very old). After booting, the OS loads the driver module(s) and detects the new controller and drive. I was able to add the new sata drive into the LVM system using system-config-lvm. All was fine until I rebooted.

I get pages of lvm errors and booting fails. It looks like it's trying to mount the volumes before the sata controller is modprobed. Is there a way to get the os to modprobe for the new controller before trying to mount?

P.S. The extra drive space is on a data partition, not the boot partition.

SlowJet
18th October 2009, 08:14 AM
https://bugzilla.redhat.com/show_bug.cgi?id=485546

Read thru this bug and note post #9.

Basically, a controller => bios type (ach hch patii4, whaterver) match up in modprobe.conf may do it.

SJ

Don-B
19th October 2009, 02:46 AM
Thanks, that thread helped a lot. I haven't solved my problem yet, but it was a good read. The day took a bit of a strange twist; since the box wouldn't boot, I ended up reinstalling. After the install, it hung on reboot. I ended up removing the sata board, re-installing again, rebooted (which worked), and re-installed the sata board. I also found an updated bios and installed it, but it didn't make any difference. Now the box boots.

From the thread, I created a file named /etc/modprobe.d/sata-addon with this line:

alias scsi_hostadapter sata_sil24

...hoping that it would force the driver to load early in the boot, but it didn't make a difference. I'm not sure I followed the logic in the thread so this might not have been the right move. Any suggestions on the next thing to try?

SlowJet
19th October 2009, 05:38 AM
I don't have any more but
if there is a /etc/modprobe.conf move it inside .etc/modprobe.d (because depreciated NOT .conf or in a .d dir.)

Then edit modprobe.conf
to add a line
alias scsi_hostadapter sata_sil24

SJ

markkuk
19th October 2009, 02:13 PM
Is there a way to get the os to modprobe for the new controller before trying to mount?

Yes, create a new initial RAM disk (initrd) file after adding the alias for your driver in /etc/modprobe.d. See "man mkinitrd".

SharpyWarpy
20th October 2009, 01:24 AM
Just for giggles... Why not remove it from LVM and load the module with a line in /etc/rc.d/rc.local and mount it there too?

Don-B
21st October 2009, 02:38 AM
Thanks for all the suggestions!

Slowjet - I'm not sure I understand; I don't have a /etc/modprobe.conf file, but I do have:

/etc/modprobe.d/anaconda
/etc/modprobe.d/blacklist
/etc/modprobe.d/blacklist-ath5k
/etc/modprobe.d/broadcom-wl-blacklist
/etc/modprobe.d/floppy-pnp
/etc/modprobe.d/i915modeset
/etc/modprobe.d/madwifi
/etc/modprobe.d/modprobe.conf.dist
/etc/modprobe.d/video4linux

...and I created:
/etc/modprobe.d/sata-addon

...with this line:
alias scsi_hostadapter sata_sil24

Did I put it in the wrong place?


markkuk - thanks, I'll try this next

SharpyWarpy - that's what I was thinking about doing if nothing else worked. If they don't, I'll give it a try.

I got busy at work so won't be able to try any of these until Friday. I'll let you know what happened then.

Don-B
23rd October 2009, 02:56 PM
I got it to work, but tripped over a couple of bugs on the way there. Thanks to everyone that helped me here, I really appreciate it. Here's the solution:

1. The sata add-on board has a sil3124 chipset; which uses this driver module:

/lib/modules/2.6.27.9-159.fc10.i686/kernel/drivers/ata/sata_sil24.ko

2. Using mkinitrd to rebuild initrd doesn't use files located on /etc/modprobe.d yet, so you have to use /etc/modprobe.conf. I created /etc/modprobe.conf with a single line:

# we need to preload the driver to find the sata addon board at boot
alias scsi_hostadapter sata_sil24

... here's the report about mkinitrd - https://bugzilla.redhat.com/show_bug.cgi?id=457870

3. Inspect the contents of /boot/initrd-2.6.27.9-159.fc10.i686.img to determine if the driver is already being pre-loaded

[root@irene boot]#star -t -z -v -f initrd-sata_addon-2.6.27.9-159.fc10.i686.img

, or

[root@irene boot]#star -t -z -v -f initrd-sata_addon-2.6.27.9-159.fc10.i686.img | grep sil

... here's the thread on initrd - http://www.mailinglistarchive.com/fedora-list@redhat.com/msg01413.html

...if you don't have star, then install it with:

[root@irene boot]#yum install star

4. Rebuild initrd with:

[root@irene boot]#/sbin/mkinitrd -f --with=scsi_wait_scan /boot/initrd-sata_addon-2.6.27.9-159.fc10.i686.img 2.6.27.9-159.fc10.i686

... -f overwrites existing file, --with=scsi_wait_scan is the solution to other bug (but I'm not sure it's actually needed), 2.6.27.9-159.fc10.i686 is the location of the kernel modules (yours may be different).

...link to scsi_wait_scan report
https://bugzilla.redhat.com/show_bug.cgi?id=476337

...link to initrd tutorial
http://www.yolinux.com/TUTORIALS/LinuxTutorialKernelRpmInstall.html

... ignore warning message at the end of the rebuild:
"The default plymouth plugin (.so) doesn't exist"

5. Make sure the driver is in the new initrd

[root@irene boot]#star -t -z -v -f initrd-sata_addon-2.6.27.9-159.fc10.i686.img | grep sil


6. Make adjustment to /boot/grub/grub.conf. I commented out the existing initrd file and replaced it with the new one.

title MythDora (2.6.27.9-159.fc10.i686)
root (hd0,0)
kernel /vmlinuz-2.6.27.9-159.fc10.i686 ro root=UUID=90b97346-b980-4360-
#initrd /initrd-2.6.27.9-159.fc10.i686.img
initrd /initrd-sata_addon-2.6.27.9-159.fc10.i686.img


7. Reboot and cross your fingers.

8. Add new drive into LVM. I used system-config-lvm

-initialize new drive (partition)
-add to existing volume group
-edit volume group to use newly added extents