A while back I built a relay board to turn a bunch of SATA hard drives on or off. The set up is as follows. I have an atmega238 controlling 8 mechanical relays which power any of the 8 SATA hard drives from an external power source. Each hard drive is connected to a cheap SATA to USB converter and is then connected to an 8 port usb hub. It all works well except for the cheap SATA to USB converters. They work for a while and then suddenly die. I’d like to replace the converters and usb hub with a single SATA to USB converter and be able to “switch” between sata cables connected to the respective hard drives.
I’d loose the ability to have multiple drives spinning at the same time but thats ok.
So my relay board will take care of powering the respective dive and I’d like to be able to create another circuit that connects to the SATA to USB converter and is connected to all 8 SATA data cables and just switches which cable is connected to the converter.
What would be the best approach to achieve this? Could I use shift registers ?
Any help is much appreciated.
Using a USB hub as per your original solution strikes me as the best approach, and if I had this problem I would try to solve it by curing the SATA/USB adapter failures. If the problem is caused by poor quality components, then replacing them with better quality ones would be the most obvious approach.
My worry about your plan to switch the SATA/USB adapter between different SATA drives is that SATA is not designed to be switched like that and I don't know what will happen to the devices on either side when you perform the switch while either side is live. It could easily damage either of them.
Just powering up the devices as needed, leaving each one permanently connected to a USB hub and using standard decent quality components throughout seems like the most sensible approach - in fact, the only sensible approach.
Do you have a scheme to unmount the drives before you power them off? You really need to, to avoid the possibility of corrupting the drives.
I stop the drives with my custom software before sending the signal to cut the power.
The other problem with the current solution is trouble shooting issues, as there are so many possible points of failure ie sata not plugged in correctly into drive or converter or converter is dead or port on the hub is dead. and its become a mess of sata cables, power lines, converters and not to mention the franken-hub that needs to be constantly powered.
what if both ends were completely devoid of power before the switch ? lets say the usb conveter / pc connection were severed and the drive had no power, then the switch is performed, the drive is brought online and then finally the usb is reconnected.
Does that sound it could work ? and what would be the best approach to making the switch between sata cables ?
Daveill:
The other problem with the current solution is trouble shooting issues, as there are so many possible points of failure ie sata not plugged in correctly into drive or converter or converter is dead or port on the hub is dead. and its become a mess of sata cables, power lines, converters and not to mention the franken-hub that needs to be constantly powered.
I'm astonished that you see it like that. All the components you're using are standard off-the-shelf components being used as they're designed to be used, you have no moving parts and nothing needing to be plugged or unplugged. It's conceptually simple and, if you use good components, should be as reliable as any other disk drive. If you're seriously viewing SATA cables not plugged in correctly as an issue, I'd question whether you have any hope at all of making any solution reliable. The solution seems perfectly straight forward to me and I simply can't understand why you're referring to 'franken hubs' and multiple points of failure.
I guess I was just seeing if there was a more elegant solution. I've been using the current set up for well over a year and the way that its all hooked up is a nightmare to troubleshoot and I'm sure that if you had the issues I've had you wouldn't be so "astonished". But thanks for everyone's time. I have my answer and I suppose the way forward is to buy better components.
PeterH:
My worry about your plan to switch the SATA/USB adapter between different SATA drives is that SATA is not designed to be switched like that and I don't know what will happen to the devices on either side when you perform the switch while either side is live. It could easily damage either of them.
Just powering up the devices as needed, leaving each one permanently connected to a USB hub and using standard decent quality components throughout seems like the most sensible approach - in fact, the only sensible approach.
Do you have a scheme to unmount the drives before you power them off? You really need to, to avoid the possibility of corrupting the drives.
I thought SATA was hotplug-able? If not......oops.
Any particular reason why you don't just get a RAID card with more SATA ports, then just power on and mount the drives as necessary? You would get better transfer speeds and eliminate everything except the SATA cables.
wizdum:
I thought SATA was hotplug-able? If not......oops.
I didn't know that, but it seems you're right - it is hot pluggable. However, that assumes you're using standard SATA connectors to make/break the connections, and also that you're powering the device via the SATA connection. If you're going to physically intercept the wires then you would need to determine the correct connection/disconnection sequence and ensure that your switch/relay system followed it.
This strikes me as a lot more dodgy than the original solution of powering the drives separately and connecting them via a standard USB hub - I am simply not convinced this is going to be a more reliable solution.
wizdum:
I thought SATA was hotplug-able? If not......oops.
I didn't know that, but it seems you're right - it is hot pluggable. However, that assumes you're using standard SATA connectors to make/break the connections, and also that you're powering the device via the SATA connection. If you're going to physically intercept the wires then you would need to determine the correct connection/disconnection sequence and ensure that your switch/relay system followed it.
This strikes me as a lot more dodgy than the original solution of powering the drives separately and connecting them via a standard USB hub - I am simply not convinced this is going to be a more reliable solution.
I'm with you on that. If adding more SATA ports via a PCI/PMCIA/MSATA/port multiplier card isn't an option, getting more reliable SATA to USB adapters/docks would be the best solution.
I think we have the same project idea. I assume you are working on a hdd cold storage sollution with minimal power consumption.
I did not know there was a 4 pole relay switch. I’ve been messing with the normal reply boards. Not elegant.
Creating a switch relay board between one SATA power supply and multiple is great. Smaller.
I’ve been looking at the 4 pole relays. Should be possible to design a board for that. (Dont have the skills for that though) did you manage to get a more stable solution for your project?
The extremely high frequencies of sata signals should not travel over relay contacts, unless it's a coaxial one made for 6Ghz.
Why. Sata can be hot-swappable, and/or you can put your drive offline in the DiskManager.
I don't see how this is an Arduino problem.
Leo..