SATA/IDE warm plug/unplug

This is for SATA and IDE interfaces that do not automatically detect added/removed devices.

Scanning for newly added discs:

echo "- - -" > /sys/class/scsi_host/host0/scan

safely removing a disk

echo 1 > /sys/block/sda/device/delete

Other notes...

In the HP MicroServer, we can identify the host to scan by:

head -1 /sys/class/scsi_host/host*/proc_name

And look for the pata_atiixp. Should show ahci and usb-storage too.