Does Lucid support hotswapping of AHCI devices? Is there anything more to it than simply unmounting all filesystems on the drive to be disconnected and plugging in the new disk?

00:1f.2 SATA controller: Intel Corporation 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA AHCI Controller (rev 02)

is the controller I'm working with.

BIOS is set to AHCI. I also tried simply unmounting and unplugging. That seemed to work fine. Plugging in a new drive locked up the system. AHCI kernel module is also loaded.

I've also looked at the Raid WIKI on kernel.org which talks about hardware requirements for AHCI HotSwapping of disks. My drives and cables all appear to meet the criteria, but most of that info pertains to the electrical side (grounding, etc...).


First, make sure you are using the SATA power connector; the molex one is not designed to be hot plugged. Before removing the old drive, you should write a 1 to /sys/block/sdX/device/delete ( after unmounting it of course ). When the new drive is connected, you may need to write a 1 to the scsi_host/scan file ( I believe that some hardware is capable of detecting the hot plug and will automatically scan ).

So the complete steps you want to go through to remove an existing drive and then replace it are:

sudo -s
cd -P /sys/block/sdd/device
echo 1 > delete
cd ../../scsi_host/host*
echo '- - -' > scan


Make sure your BIOS is set to AHCI mode rather than IDE-compatibility mode. I know that Intel ICH8 are truely hotswappable wrt drives.

I believe you will have to re-read the partition table. You can tell the OS to re-read the table using he partprobe command:

manjo@hungry:~$ partprobe --help
Usage: partprobe [OPTION] [DEVICE]...
Inform the operating system about partition table changes.

  -d, --dry-run    do not actually inform the operating system
  -s, --summary    print a summary of contents
  -h, --help       display this help and exit
  -v, --version    output version information and exit

When no DEVICE is given, probe all partitions.

Report bugs to <bug-parted@gnu.org>.

or you can try ... echo 1 > /sys/block/sdc/device/rescan (not sure of that though).

I think even without re-reading the partition table your should be able to detect new drives, but you run the risk of it not working right.

  • When the new drive is detected, its partition table is read automatically. The rescan is sufficient. – psusi Mar 11 '11 at 16:07

There are some posts on UbuntuForums that might help you solve your problem.

Post #1 (recommended)
Post #2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.