SATA – Demystifying Hotplug

bioshard drivehotswappingsatassd

I have a BIOS that has an option to enable hot-plug on individual ports. I have a sliding enclosure for HDD and SSD (nothing more than a pass-trhu to power and a sata port) that allow me to cut power to the drive before physically moving it.

I would love the convenience of inserting and removing HDD/SSD there without shutting down the computer every time.

But while researching about SATA hotswap, out of expensive enterprise solutions, there is zero reliable information. I tried even looking at patents. I can't find a single reliable source that tells me how reliable/unreliable is hotswapping on the consumer world.

So, I do have support in my bios, motherboard and enclosure. The drivers I've never seen mentioning hot-pluggable on the specs, even on the enterprise ones. How much risk of data loss will i be facing for this convenience?

Then, hardware aside, there is the software issue. Do i need support on the OS? and is there any AT command to unplug the drive that must be issued or does it park it's head on power down automatically? there is a slightly informed discussion on the software side here


edit:
found some more info regarding hot-pluggable. from Western Digital: it says every driver that supports SATA by definition of the standard, already support hot-plugging.

SATA-compliant devices thus need no further modification to be
hot-pluggable and provide the necessary building blocks for a robust
hot-plug solution, which typically includes: Device detection even
with power downed receptacles (typical of server applications)

Pre-charging resistors to passively limit inrush current during drive
insertion

Hot-plug controllers to actively limit inrush current during drive
insertion

source: http://wdc.custhelp.com/app/answers/detail/a_id/941/~/hot-swap-or-hot-plug-wd-sata-drives


But, the above starts another doubt. it says:

In order to take advantage of hot-plug capabilities for your Serial
ATA hard drive, you must use the Serial ATA power connection, not the
Legacy (Molex) power connection. The Legacy (Molex) power connection
does not support hot-plugging.

some of my drivers are connected from molex->sata power, just because i'm out of sata power ports on my PSU. from what i could trace, some molex and Sata power comes from the same 12V rail. and the SATA plug does not have any logic it seems. it is just dumb plastic. Does that mean i'm safe and the doc refers to drivers that supports both sata and molex?

Best Answer

How much risk of data loss will i be facing for this convenience? Unless the drive dies, there's not much risk of data loss. HDD are really reliable with handling unexpected power lost. SSD are not as reliable regarding unexpected power lost. That said, if there's no activities happening on the drive, hot-plugging is pretty safe. I do this almost everyday.

Do I need support on the OS? Nah, the drives doesn't care about the OS. If the OS doesn't support hot-plug, then it means the OS might need to restart to detect the drive, and that it won't send commands to the drives for a more graceful shutdown. Worst case scenario, the OS crash, but your drive will be OK. Remember, as long as there are no activities on the drive, then it's pretty safe to unplug it.

Is there any AT command to unplug the drive that must be issued or does it park it's head on power down automatically? There are commands to force the drive to park it's heads, but it will also do that when there's no activity on the drive. Can't guarantee that it will park it's head automatically on power down, because we can't guarantee it has enough power to do it.

Oh, here's a caveat. Some OS might delay sending data to the drive, or saving file system information to the drive. This is when you should use the "Safely remove" or "Unmount" features. This only applies for newly written data.

Related Question