[CentOS] CentOS 5.2 and SATA HotSwap

Filipe Brandenburger filbranden at gmail.com
Thu Feb 19 12:28:52 UTC 2009


Hi,

On Wed, Feb 18, 2009 at 10:57, Julio Rodanes - KNET <julio at knet.es> wrote:
> I have read that the AHCI module allows hotplug but when I add a hot new
> SATA disk, the system don't detects it .
>
> Any idea of what the problem is?

Even though it's hotplug, you have to give Linux a command so that it
will scan the bus and add the disks to its internal tables.

To do that, first you have to identify which SCSI host it will be your
SATA controller, you can see a list of the ones you have with this
command:

ls /sys/class/scsi_host/

To identify which one is your SATA, look in /proc/scsi/scsi, for
instance, if it's scsi4 there, it will be host4 in /sys. You can also
look at dmesg or /var/log/dmesg and see the messages of when your
other disks were detected, it will show it with names as scsiX or sd
X:0:0:0. Also grep for ahci in dmesg, it might give you a clue. You
might have multiple hosts in one AHCI controller, you might have to
figure out which one your disk is connected, or scan all of them.

Once you found which host it is, issue the following command as root:

echo - - - >/sys/class/scsi_host/hostX/scan

I wrote "hostX" above, but you have to use the proper number, like
"host4" if your SATA is scsi4.

This should work. Let us know how that goes.

HTH,
Filipe



More information about the CentOS mailing list