# Turn on and off SATA drives

I'm building a small server, and I was planning to add a smaller disk to perform backups. The problem, here, is that ideally the smaller disk should be turned on just when performing the backups and then shut down when the backup is completed.

Since the motherboard supports SATA hotplug, I was planning to just put some high power MOS (in fact they are more complex switches, but let us consider it just a PMOS) in series with both the 12V and the 5V rails going to that HDD. This way it should turn off.

Now, is there any problem with this approach? I mean, the data cable will be always attached, and I'm just removing the power. Can this cause problems?

The disk is a 3.5" HDD (7200rpm)

• I would worry more about 3.3V being permanently connected or absent (you don't tell which you do) – PlasmaHH Nov 17 '16 at 17:58
• Any particular reason you don't want to use the already-existing power-saving feature which will spin the drive down after some period of inactivity? – brhans Nov 17 '16 at 17:58
• @PlasmaHH Nothing uses the 3.3V rail. It's often not present (e.g, when using Molex to SATA adapters), so everyone just derives 3.3V from 5V if needed. – duskwuff Nov 17 '16 at 18:15
• @PlasmaHH as duskwuff stated, the 3.3V rail is usually not used. In fact I'm planning to use a IDE-to-SATA power adapter, so only 5V, 12V and ground are connected – frarugi87 Nov 18 '16 at 16:03
• @brhans the fact is that I prefer to let it "rest in peace", this way I'm sure the backup disk is not wearing out (after all, it is needed only when backup tasks should be done) – frarugi87 Nov 18 '16 at 16:04

The question is effectively: "can SATA controller tell the difference beween SATA port connected powered down drive and SATA port not connected to anything?". I think the answer is no, so you should be fine.

(1) SATA cable only has 2 differential pairs, so there is no CPD or any other out-of-band information that can be used to tell if drive is plugged in.

(2) One arbitrary SATA PHY datasheet suggests that receiver only cares about presence of differential signals, and not about common mode or transmitter resistance: http://electronix.ru/forum/index.php?act=attach&type=post&id=607 says:

SIGNAL_LEVEL_VALID output from the PHY indicates that the differential input signal exceeds the squelch detector threshold.

(3) The same datasheet has no mention of receiver detection on transmitter part.

I am going to guess that other PHY's behave the same way, and thus you can safely power drive off while leaving it connected.

This said, are you sure this is what you really want? There may be easier alternative solutions:

• If your goal is to save power / have less heat or noise, you can always unmount, then use hdparm to put the drives into sleep mode. No hardware required.
• If your goal is to protect from viruses, then the viruses can still infect the drive while the backup is running. It will be safer to make a mini-NAS with access over the network.
• If your goal is to protect hdd from lightning strikes / power surges hitting the computer you will want to use USB or Ethernet enclosures -- this way, a power surge will burn out USB/Ethernet port on the enclosure, hopefully leaving the drive intact.
• The question, in fact, was partially what you guessed, and partly "can a SATA transceiver withstand signals on its data lines even when powered down?". I mean, if you send a +5V signal on the gate of a CMOS port it usually complains (unless it was designed to withstand this, like the 74AHC family). I think that, since SATA is a quite modern standard, it can withstand the small differential voltage on the data lines, but I wanted to be sure. – frarugi87 Nov 18 '16 at 16:10
• My ultimate goal derives from the suggestion everyone always gives: "use an external drive for backups and detach it when you are done". Now, I wanted to have one internally connected, because it is much easier to have the PC attach the HDD on its own, but I wanted to physically detach it so that I was sure that the HDD was not spinning (and wearing out). I don't know if I can trust the sleep mode (will it power it up sometimes?), so I prefer to power it down, but making a switch for SATA signals is a bit too complicated, so I'd prefer to leave them attached all the dime and just cut the power – frarugi87 Nov 18 '16 at 16:14

I have used the ready made quadruple power switches to four SATA drives from Ebay - (no longer) marketed as 'four channel SATA device HDD power switch (Model PT628)'. In concept, a brilliant device - and also while they work. As mentioned above, ideal for motherboards that support hot-plugging of HDDs. I have found that they work for a day or two or three and then no longer. Malfunction is not permanent - they can be restored by being fitted to a different computer - used in it and then put back in the original. The reason is beyond me, but it seems to me that if they were MECHANICAL switches instead of (I infer, electronic) then they would not interfere with each other and the switching would be 'absolute' (as is needed). I have found NO advertisements for MECHANICAL switches, but cannot conceive of any theoretical objection to mechanical rather than electronic switches.

• My poor high speed design professor would turn in his grave, if he were dead... ;) – frarugi87 Jun 23 '17 at 15:56

If you are capable of hacking (physically) electronic systems, cut the red cable that brings the 12v to your hard drive and connect it back with a simple switch. That way you will be able to turn on and off the drive whenever you want easily. You shouldn't face any problems with the HDD. These drives are extremely durable and capable when having to deal with power drops. Just make sure you always unmount (or safely remove if it's a windows server) your backup drive before powering it off. The data cable cannot cause any issues if the drive has no power.

Notice: Buy a durable switch that can handle the heat and make sure you isolate the connections properly.

• Correction: the standard is the yellow carries 12 volts while red carries 5 volts. Also, I wouldn't want to disconnect only one the two voltages for any period of time. – DoxyLover Nov 18 '16 at 1:38
• I agree with @DoxyLover: I was already going to use a "switch" (not a mechanical, but an electronically-controlled one - e.g. a transistor). I just needed to be sure about what you stated: "The data cable cannot cause any issues if the drive has no power" – frarugi87 Nov 18 '16 at 16:06
• I am absolutely sure about that. If you dont give power to the drive, it cannot boot and move the head to get data. So the sata cable wont transfer anything. Just dont let your drive get 12v – Chris Tsiakoulas Nov 18 '16 at 17:28