Proper way to plug/unplug an eSATA hard disk?
For my Linux hardware problems, Google is often my friend. Unfortunately with regard to SATA hot-plug (or hot-swap) support under Linux, all the links I've come across refer to solutions several kernel releases out-of-date.
The problem: what is the proper procedure (on the software/OS side) to follow when plugging or unplugging an (e)SATA drive? Is a simple "umount /dev/sd[:alpha:][:digit:]" enough?
Among the "obsolete" solutions I've come across is to use a program called "scsiadd":
scsiadd:scsiadd(): could not open /proc/scsi/scsi (w): No such file or directory
Also SATA hot-plugging is as yet unsupported by the wonderful new devkit framework. To unplug a USB drive, I use "devkit-disks --detach /dev/sd[:alpha:]" or its GUI "safely remove hardware" equivalent. This doesn't work with the eSATA interface of my external hard disk enclosure.
To be sure, an examination of the contents of /dev/ shows Linux gracefully removing the nodes (both disk and partition) for an unplugged eSATA drive. This is confirmed by the dmesg output.
(Note: I have enabled AHCI and disabled IDE mode for SATA in the motherboard BIOS, so SATA device recognition is not the issue. I'm looking for the proper or most elegant way to unplug/replug an eSATA drive.)
Tags for this Thread