I’ve found diverging instructions on the ’net about this.
To recap: SATA with the 4-pin Molex (white) power plug is not hot-pluggable, but either the wide connector or the separate (15-pin power and 7-pin data) connectors are.
However, in which order do I plug the cables in? Asrock says to connect first the data cable to the mainboard, then to connect, in this order, the power cable, then the data cable, to the drive. Another hardware guide says to connect the data cable first.
It’s surprising that a definitive answer on this is so hard to find.
In the SATA specification this is referred to as
hot plug
andhot removal
and they are two separate events. While the electrical and communication layers support both hot plug and hot removal, check that your drive controller, operating system, and drivers support them.Note that all of the below ONLY applies to host and devices (ie, drive controllers and drives) that BOTH declare they are hot plug capable.
If your drive controller has specific instructions, follow them. If not, read on.
It doesn't matter which plug to attach first. SATA drives are allowed to be connected to data without power, and to power without data. They are designed so when data is connected without power, some limited drive information can still be obtained (this is mostly used in RAID and backup setups where you want to keep some disks offline to reduce wear and tear, but still need to know what's installed).
So if you plug in the power first, the drive turns on, recognizes there's no data cable, and waits for the data cable to be attached.
If you plug in the data first, the computer recognizes the drive attachment, and that the drive isn't ready, and waits for the drive to signal that it's available.
If you do happen to get a single cable with both power and data, though, you'll find that the data pins are further behind the rest. The pins are staged as follows:
This suggests that while the drives and controllers should support plugging either cable in any order, when they have control over how cables are connected they prefer power before data.
So if you wanted to be pedantic and prefer one order above the other, your best bet is to follow what they do and connect the data cable last. Note that disconnecting the data first, then the power, when removing the drive will allow the drive to detect the removal, and possibly perform a few last millisecond housekeeping tasks before the power is fully removed.
But, again, the specification allows connection in any order, and should work fine in any order.
Specification excerpts
From SATA revision 3.0 June 2, 2009 Gold Version
You might think the above suggests that power should be applied first or simultaneously, but this is clarified in 7.2.5.1:
Here's the key part of the specification you're interested in. All the following situations shall not damage the device or host, and both the device and host shall resume normal TX/RX communication after any of the following events. While these discuss specific architectures (backplanes, for instance) the drive and host themselves are electrically and otherwise the same - these are merely methods of connection and there's no practical difference between them and your individual cable scenario:
Power remains connected while data is plugged/unplugged
Data is connected where power is not available
There are two other situations here which don't apply to this question. Read the spec for more.
However, they do provide the following warning in the specification:
In other words, the hot removal capability is the responsibility of the system designer, and they should ensure the drive is stopped before hot removal occurs. You, in this case, are the system designer. If your OS and driver don't have a mechanism to allow you to turn off the drive before unplugging them, then you aren't providing adequate hot removal support, and should not perform hot removals on the system. This is tackled by manufacturers by providing locking or handled drive cages where the lock to remove them tells the OS to perform the drive shutdown, or pulling the handle out a short way does so. The user is then instructed to wait for notification that the drive can be removed (usually an LED on the drive carrier itself).
It is theoretically best to connect the power cable to the hard drive to allow the hard drive the brief second to initialize, but this is seriously only a brief 'moment'. If you look at the power connectors on a SATA 15-pin power cable and on the 7-pin data connector you will notice that some of the traces extend out slightly, this allows the powered connections to make contact before the data connections do.
Here is an example: http://www.satacables.com/assets/images/sata-power-cable-extension-8-inch.jpg
So the long story short is it makes little difference on which physical cable you plug in first as the SATA connectors have thought this issue through for you. You could technically plug them both in at the same time and have perfectly normal results (as would be the case when plugging into a hot swap drive bay).
This question would get more answer and attention on superuser's section.
For your question, I would follow the manual from your motherboard (asrock). Usually the harddrive will warn up when you plug it, thus it's more logic to plug the Ac before, and after the data cable, but honestly I don't think there is a order, as hdd caddy do plug them at the same time when you slide them.
I've always thought it makes sense to connect the data cable first. When the drive is off, there will be no noise when you connect the data cable. (That's my 2 cents).