Build Your Own SATA Hard Drive Switch 131
Mikey Win writes "ExtremeTech shows us a cool hardware hack that allows multiple operating system to boot without dealing with any tedious BIOS setup changes. How? By building your own SATA hard drive switch. The result? You can expect a longer hard drive life span, power supply load reduction, and partitions protected from becoming overwritten or corrupted."
Dubious claims (Score:3, Funny)
"You can expect a longer hard drive life span"
Well, assuming you build it right.
Mad scientist hard drive switch (Score:5, Funny)
Hrmph. Call me when the switch in question is tied to a massive, mad scientist-quality switch, clearly labeled in big letters with "LINUX" on one side, "WINDOWS" on the other. It should also make a satisfying mechanical switching noise whenever I pull it. And if you can make lightning crack outside my window every time, that'd be nice, too.
Re:Mad scientist hard drive switch (Score:5, Funny)
Hrmph. Call me when the switch in question is tied to a massive, mad scientist-quality switch, clearly labeled in big letters with "LINUX" on one side, "WINDOWS" on the other. It should also make a satisfying mechanical switching noise whenever I pull it. And if you can make lightning crack outside my window every time, that'd be nice, too.
I'll get Igor to start work on that right away.
Re: (Score:3, Funny)
Re: (Score:3, Funny)
Re: (Score:2)
I think you mean iGore, a member of Apple's board.
Re: (Score:2, Funny)
Re: (Score:2)
But he won't allow the lightning requested. Something about ozone . . . :)
hawk
Re: (Score:3, Funny)
You might be confusing him with iGor, inventor of the iNet.
Re: (Score:2)
and I'd better hear "it's.......Aliiiiiiiiiiiiiiive!" with that crack of lightning.
I like it (Score:3, Informative)
Low tech and simple. The only thing I might do differently is attach the rotary knob to an unused PCI backplane thingy instead of an unused drive bay - would make it harder for inquisitive people/pets to crash things.
Re: (Score:3, Insightful)
Show me how to make or point me in the right direction to making a big red ABORT button for my computers and that's a project I can get behind.
Re: (Score:1)
Well that's pretty darn easy, depending on what you want that abort button to DO. :)
Re: (Score:3, Informative)
Re: (Score:2)
The connectors on drive caddies are rated for like 10k operations.
Re: (Score:3, Informative)
Re: (Score:1)
When using a drive caddy, are you actually dis/connecting from the HDDs connectors each time?
I assumed that most caddies these days have a separate connector between the caddy and carrier which is being dis/connected, but the HDDs connectors are never dis/connected from the caddy unless you are disassembling the caddy.
Re:I like it (Score:4, Informative)
Re: (Score:2)
It's not being cheap, it's just eliminating unnecessary expense and complexity. The SATA/SAS data and power connectors were explicitly designed to be easily hot-swapped, so that extra connectors on the caddies wouldn't be needed. Notice that the SATA/SAS connectors have guide pins on them to ease mating when being slid into a drive bay, and that certain pins on the connectors are longer than others, so they'll make contact first. These drives were designed to be hot-swapped from the beginning. It would
Re: (Score:1)
Most hot-swap drive caddies these days are just rails that you screw onto the sides of the drive. The drive connectors plug directly into the backplane.
Re: (Score:2)
I prefer screwless caddies. I don't want to have to buy a caddy for each drive nor do I want to have to unscrew a caddy from one drive just to screw it onto another one.
That said, the caddies for the SATA drives of a Mac Pro are tolerable to me. Only two screws to the base of the drive and they're big enough to turn with your fingers. Better though if they had wingnut heads for greater leverage.
That said, when it was time to move from 500 GB to 750 GB internal drives, I bought myself a stage rack. Drop a ba
Re: (Score:2)
This item is nice:
http://www.newegg.com/Product/Product.aspx?Item=N82E16811998021 [newegg.com]
It is a tray, but it also has a little button on the front that lets me turn the disk on or off (before the machines boots obviously). Two of these would probably do exactly what you want to do, assuming you only had one on at a time.
Re:I like it (Score:4, Informative)
After giving the article a quick skim, it also looks like they switched the ground wires too, which is unnecessary. All you really need to do is to switch the red and yellow wires (+12V a,d +5V). They can all share ground no problem.
Re:I like it (Score:5, Informative)
In fact switching the ground wires under power gives you a high risk of blowing up your drives: If you use a non-bridging switch (or it does not make perfect contact, as cheper ones may do after some time), you can have a situation where +5V and +12V have contact, but ground does not. This typically leads to immediate death of the whole drive electronics.
These people have no clue what they are doing.
Re: (Score:2, Insightful)
In general, switching this thing while the computer is running would, at least, cause massive problems for any OS that happened to be running. So this is something to be avoided in any case.
Re:I like it (Score:4, Insightful)
In general, switching this thing while the computer is running would, at least, cause massive problems for any OS that happened to be running. So this is something to be avoided in any case.
Not necessarily. If you unmount (safely remove for Windows) the running drive before swithcing it off, it is fine and just corresponds to a hot-unplug followed by a hot-plug. Doing it for a mounted drive (as, for example, the system drive) is indeed a very bad idea. For a data drive, it can make sense.
Re: (Score:2)
Not to mention that putting a switch to disconnect a primary hard drive on the front of a case is just plain stupid.
I fail to see how this promotes longer hard drive life than changing the BIOS settings, let alone using a bootloader. And mounting a non-native filesystem as read/write is something you're very unlikely to do by mistake in ANY operating system in the first place. Any additional "protection" you'd get from this is almost purely imaginary, unless you're trying to protect yourself from random p
Re: (Score:2)
Indeed.
Re: (Score:2)
The longer life comes from not powering up a drive that you're not going to be using. What you're talking about, with a bootloader, involved spinning up both(/all) drives and leaving them running, even if you're only going to be using one.
Common sense dictates that a drive will last longer if it isn't run for as long.
Re: (Score:2)
Actually, permanently connected ground wires are the only sane design option here.
I agree about this incompetent hack not being newsworthy.
Re: (Score:2)
Well, yes. With a bit of luck even the ground connectiosn in the data cables will be enough. But this is not the way to treat a valuable (from its contents) computer part.
Re: (Score:2)
Re: (Score:2)
My SATA hard drive once flew out of my laptop (literally across the room) when I dropped it. I just popped it back in and used it for several more hours, nothing died.
Granted, I don't think anything was actually running at the time (just the OS), but nothing bad happened.
Re: (Score:2)
Removing a running drive is (on the data storage side) essentially the same as cutting power the the PC while it is running. Maybe you'll get data corruption, but you'll probably be fine.
The SATA specification calls for drives to be hot pluggable, so the drive shouldn't experience any hardware failures. But the controller may not be designed to handle hot plugging a drive, so you risk damaging the system with such a move.
Re: (Score:2)
Wouldn't be very practical for a boot drive, but you could 'hide' a porn drive from the wife/kids...
Signal But no Power == BAD? (Score:2, Interesting)
Something tells me this is probably not a good idea.
Having a signal connected to the hard drive, and no power applied, at least in a traditional TTL or CMOS circuit, is not a good idea.
Since SATA is based on LVDS, this might not suffer from the typical CMOS or TTL problems, but I would investigate it a bit further.
Re:Signal But no Power == BAD? (Score:4, Informative)
Having a signal connected to the hard drive, and no power applied, at least in a traditional TTL or CMOS circuit, is not a good idea.
Since SATA is based on LVDS, this might not suffer from the typical CMOS or TTL problems, but I would investigate it a bit further.
SATA has coupling capacitors, so this is not a problem.
Re: (Score:2)
Sorry, you do not undertand digital design. This is a differential, digital connection and of course the inputs have protection circuits. The risk without the coupling capacitors is not to the signal circuitry, but to the protection circuit.
Hot swapable drive caddy. (Score:2)
They are cheap.
They don't invalidate your drives warranty.
Will do accomplish the exact same task.
Re: (Score:2)
I believe that it is neither of those.
Re: (Score:2)
Actually the article on extreme tech implies that it does.
Also I am not sure of what might happen if you switched the drives with the power on. I do know what will happen if you do switch it while the drive is writing. A caddy often will have a nice safe lock so it is a lot less likely than bumping a switch.
And since I have seen SATA drive caddys that cost under $14 so I am not sure that this switch is any cheaper.
Re: (Score:2)
Ive been using drive caddies for years. I even have a couple of old drives (250mb IDE) with dos and WFW3.11 (and trumpet winsock) on them, for grins and giggles. I do need to update to SATA caddies, which I have been putting off until the majority of my systems are SATA2, which will happen next week.
Caddies make testing new OS's and configurations so much easier and safer, it more than pays for the expense and the very minor hassle of installing the tray assembly in a CD ROM bay. Of course, with SATA, us
How is this a SATA switch? (Score:5, Insightful)
It's just a drive power switch. I was expecting the actual SATA connection to be switched not just the power to the various drives.
Re: (Score:2)
Well, if you include a few more pins, then you should be able to merely extend the current design to include the data cables...
Re:How is this a SATA switch? (Score:4, Informative)
Well, if you include a few more pins, then you should be able to merely extend the current design to include the data cables...
Only if you want to deal with a bunch of CRC failures. You can't really expect to be able to mess around with signal lines when you're switching at 1.5 or 3.0 Gbps.
Re: (Score:2)
Data cables that are much shorter than the standard allows usually can have many more defects in them without being out-of-spec on the electrical characteristics. Even with the switch, you'd likely still be running over significantly less than 1 meter. I'd be willing to believe that if you did a half-decent job of putting the switch together, you could make it work.
Re:How is this a SATA switch? (Score:4, Interesting)
I've helped to guide a bunch of SATA boards from prototype to product. From personal experience, I can tell you that a switch put together "half-decently" is very likely to result in unreliable SATA communication.
Re: (Score:2)
Re: (Score:2)
Did you even read this article? People who would put together a toggle switch like this are not the kind of people who can design a PCB using high-speed ICs suitable for switching 3.0Gbps LVDS signals.
Re: (Score:2)
With signals over 1 GHz, it's a different story. Cable length is no problem, since the cable (in other words, the transmission line) is built to spec. What kills you are the discontinuities -- discontinuities create reflections and distortions. A "decent" switch is going to require some serious RF engineering, and will be expensive.
Re: (Score:2)
Shouldn't be a problem.
http://www.smcelectronics.com/switch.htm [smcelectronics.com] Search for SW20. Enough pins there for a pata cable.
Re:How is this a SATA switch? (Score:4, Interesting)
Sata Hub (but not a switch)-> http://www.cooldrives.com/sahub5muussi.html [cooldrives.com]
Power through data kills! (Score:1, Redundant)
Switching circuits should not try to draw power from data lines! And if power is not supplied, they will. Perhaps some systems are robuse (3.3V isn't much), but I would not count on all circuits not having some overheat path.
Re: (Score:2)
Don't forget that SATA has been designed to be hot pluggable. I would not expect it to have too much influence. Otherwise we would see many people returning their SATA drives. Actually, I've had many IDE drives connected without power, and I've never seen one crash because of it. And in all these years I've never seen a computer break down because of it.
So I presume it won't do much harm.
Re: (Score:2)
Re: (Score:2)
That's a fair enough comment. I'll contact WD tomorrow and report back. They'll probably know. If they don't they may play safe though.
Re: (Score:2)
" - Because you couldn't boot, doofus."
So? That's only a minor nuisance compared to a ruined drive or motherboard. This normally happens when assembling a new PC or adding hardware. Never had a bad motherboard, controller or hard disk because of it.
Re: (Score:2)
Why? The drives would still spin up if they are still connected to power, and if SATA drives are not accessible without power anyway, why would you mess with the data lines? These are high speed serial connections, not something you want to mess with. And they are point to point, so there is little chance of them messing other components. Personally, I think it is a reasonably good idea. Switching off the drives in the BIOS is definitely more work, and you will still spin the drives if you do it like that.
Re: (Score:2)
I was expecting the actual SATA connection to be switched not just the power to the various drives.
Very difficult. The lines have an allowed time skew of 1.5ps (pico-seconds). That is 0.45mm wire length (1/56" for the metrically challenged) assuming lightspeed. Not easy to do.
Doesn't supply 3.3v (Score:3, Insightful)
The pictures seem to be using a molex->sata power adapter, which doesn't support the 3.3v line. This means that some drives won't work with it.
Re: (Score:2)
http://en.wikipedia.org/wiki/Serial_ATA [wikipedia.org]
Adaptors exist which can convert a 4-pin Molex connector to a SATA power connector. However, because the 4-pin Molex connectors do not provide 3.3 V power, these adapters provide only 5 V and 12 V power and leave the 3.3 V lines unconnected. This precludes the use of such adapters with drives that require 3.3 V power. Understanding this, drive manufacturers have largely left the 3.3 V power lines unused. However, without 3.3 V power, the SATA device may not be able to implement hotplugging as mentioned in the previous paragraph.
I haven't come across a single SATA device that won't work with a Molex->SATA power adapter. Do you have examples?
Re: (Score:2)
I haven't come across a single SATA device that won't work with a Molex->SATA power adapter. Do you have examples?
No. But leaving something out because you don't think it's used is stupid, and just asking for compatibility problems. Also note that the section of article you quote implies that such drives exist (italics mine):
Understanding this, drive manufacturers have largely left the 3.3 V power lines unused.
Re: (Score:2)
I know that the article implies that devices exist which require 3.3v, but from my experience it doesn't really seem to be an issue. If you can find an example, I'd love to hear of it.
On the other hand, if you wanted to do this hack on a fully-compliant SATA power cable, the best way would likely to get a modular power supply, and cut up the SATA power cable that comes with it.
Re: (Score:2)
Yup, and you can get cheap USB to SATA, PATA and "laptop" PATA controllers that come with such a modular power supply. You will basically get the USB to SATA/PATA for free. Certainly an option, but I would make sure that everything is earthed and on the same power outlet. And this is of course the major drawback: more power bricks and more usage of already sparse power outlets.
Mine has a molex connector by the way, so it only does 5V and 12V, not 3.3V.
Re: (Score:2)
The article implies that the drives which use the 3.3V line are the ones that support hotplugging:
However, without 3.3 V power, the SATA device may not be able to implement hotplugging as mentioned in the previous paragraph.
It doesn't say it directly, sure, but it does imply that drives that support hotplugging probably need the 3.3V line, so it is logical to conclude that existing drives using the 3.3V line are probably hotpluggable.
Re: (Score:2)
I preface this statement by repeating "in my experience..."
But as far as I can tell, drives that use the 3.3V line for hotplugging just disable hotplugging support when they don't get the 3.3V. They're still usable, just without that feature. I've used some drives that supported hotplugging with a native SATA power connection, but still worked with a Molex->SATA adapter.
I've never come across a SATA device that just flat-out refused to operate if it wasn't fed 3.3V.
Grub (Score:5, Insightful)
Re: (Score:2)
I find F8/F12 at reboot even easier.
Re: (Score:1)
Re: (Score:2)
Basically I want the other OS to not access my hard drive at all. I'm not sure I would go the way the author of the article did, but using Grub or F8/F12 certainly has drawbacks. And yes, Grub and Windows (or actually, Windows and Grub) won't always play nice to each other. I had big problems when I transferred a partition over to another hard drive (well, as I know how to get into Windows and fix the MBR, it was not that hard, but it will serve as an example).
Re: (Score:2, Interesting)
I don't know if this works with grub, but it worked with lilo when I tried.
1.Install the linux bootloader to the first sector of the linux partition. /dev/hda6 is your linux partition.
2.Export that sector to file (dd if=/dev/hda6 of=linux.bin bs=512 count=1) where
3.Copy the linux.bin file to your Windows C: drive.
4.Open your C:\boot.ini file and add C:\linux.bin="Linux" after the last line.
You can now use Windows bootloader to choose between Windows and Linux.
Re: (Score:2)
It may work with Grub or it may not, but am I going to try it out? No chance in hell. Backups only get you so far. And this is why I think the solution in the article is valid. If perhaps for a small audience, but I presume the author new that when he started to solder things to his case :)
This is hardly extreme. (Score:4, Insightful)
Sounds like a recipe for disaster (Score:5, Funny)
I would like to see what terrible, terrible things happen when some idiot let loose near your computer decides that the knob on it looks weird and takes it for a spin. In the middle of a kernel compile.
And by terrible things, I mean manslaughter.
Re:Sounds like a recipe for disaster (Score:4, Funny)
Re: (Score:2)
(She's starting to smell and the neighbors are getting suspicious.)
Intelligent Switch Would be Better (Score:3, Interesting)
Re: (Score:2)
"An active switch that could select a drive and optionally block write commands would even be better. Then you could make an image and turn on write protection."
Personally I prefer the slider on the side of the hard drive. No need for an active switch.
Re: (Score:2)
The sysadmin of one place I worked in the 1980's had the idea of putting Maplin lock switches on the power lines of the floppy disk drives - the idea was that no-one could copy stuff off or onto the PC's without the permission of a technician. Fortunately the technician insisted that he didn't want to go around with a large bunch of keys on his belt, so they just fitted the same key/lock combination to every PC and everyone just bought a key from Maplin.
I want to read the Windows drive in Linux (Score:2)
And with this [fs-driver.org] I could read the Linux drive in Windows. So I need a way to have both drives active, but change their device order. But for just reading Windows in Linux and not the other way around, it would be as simple as switching the Linux drive on and off and making sure it is always first when it's on.
If I need to access both drives from either OS? (Score:1)
Additionally, my method isn't restricted to just S-ATA drives. Not as cool, but a *tad* more functional...
Re: (Score:3, Interesting)
Re: (Score:2)
An excellent idea. Even better if it changed the drive order in the BIOS.
Not what I expected (Score:2)
I was expecting a switch that would let you switch the data cable between multiple drives. That way you could have all the drives on one port, and tell the BIOS to boot from that since it will always be the same slot. I don't see how this switch will stop errors like "Primary SATA Drive not detected" from showing up. Or how it would work in a system where you have to specify which SATA channel to boot from.
With a data cable switch you would only need one small drive for each OS (you could even use a solid s
Higly dangerous design (Score:5, Informative)
The design switches ground (Black) as well, instead of keeping it permanently connected. This means that if you use a non-bridging rotary switch (i.e. it does not short out neigbouring connectors when turning it, but has a short phase where all wires are insulated), you could kill disks when switching under power. This happens when +12V and +5V already (or still) have contact but ground does not. The effect is that -7V (a negative voltage) gets applied from Red to Yellow. Typical electronics have a tolerance of -0.5V on their supply lines and die very fast (miliseconds) if that is exceeded in negative direction.
The same can happen if your (bridging) switch gets a bit corroded and does not make perfect contact anymore. This is not so uncommon.
My bottom line is that these people have no clue what they are doing and you should under no circumstances copy this faulty design. If at all, then switch only Red and Yellow, but leave Black
allways connected at all devices. Not only is that safe, there is in fact no sane reason at all to switch Black. I can only conclude that the idea of the designers was to simply switch all wires, without any understanding of the consequences.
I think this solution is also overdone. I have XP and several Linuxes on a GRUB multi-boot on two computers. True, once or twice per year I need to use a KNOPPIX CD or memory stick to boot my system and reinstall the boot manager. Takes about 5 minutes each time. Not an issue at all.
Re: (Score:2)
Reinstall grub? Really? Why would that be necessary? Do you know what causes your need to reinstall grub?
I was going to say "I've never had to do that" but I just realized that a year ago I reformatted for unrelated reasons (I wanted to resize various partitions) and reinstalled grub as a side effect, so I can't say whether I would have had to do it if I had waited longer.
Re: (Score:2)
Reinstall grub? Really? Why would that be necessary? Do you know what causes your need to reinstall grub?
Yes. Reinstalling Windows does it (expected, although I still think overwriting an MBR without warning qualifies as computer sabotage, a criminal act). Ubuntu did it to me once too, but with warning and it was easier to just fix it afterwards. It really is only one command.
AoE anyone? (Score:1)
Now that would be interesting.
Unfortunately it was just another article meant more for digg.com
If I have many OSs and filesystems in my box, I would want to have access to everything from any OS. Linux supports NTFS, Windows supports ext3(after installing a driver).
This mod is pointless. You need 2 drives that you can only use one at a time. The amoun
these types of articles are good (Score:4, Insightful)
Most of the comments here are negative. The criticisms about swappable drive bays being better and that ground should not be switched are all valid.
However, I think articles like this are good. More people should actually do stuff, even if they burn out a few harddrives or power supplies in the process.
Re: (Score:2)
Re: (Score:2)
Most of the comments here are negative. The criticisms about swappable drive bays being better and that ground should not be switched are all valid.
However, I think articles like this are good. More people should actually do stuff, even if they burn out a few harddrives or power supplies in the process.
More people should READ A LITTLE about what they're trying to do, rather than attempting to re-invent the wheel for the umpteenth time. The large number of comments about switching ground indicates that it really isn't that hard to learn about such things. Sure, it's easier to do something without first learning about it, but it leads, generally, to unintended and often negative consequences.
While I applaud the initiative of the original subject's authors, they should not design anything that the public s
awesome (Score:1)
This will be awesome for my 2 year old who loves to push buttons and flip switches.
Now if someone could come up with a way to turn off power to the motherboard with a simple button on the desk so the cat can get in on the fun too.
A little knowledge is dangerous! Don't do it, kids (Score:2)
This article is a supe example of how having just a smidgen of knowledge can get you into deep doo-doo.
First of all they should not switch the two ground wires. If the switch disconnects those first, you have several amps of DC flowing back through the SATA signal cable ground wires and connector pins, which are not designed for this kind of current.
Gray smoke and major disk and motherboard damage is not out of the question.
Next they apparently chose the prettiest and most expensive switch in the most expe
Re: (Score:2)
Come to think of it, the SATA data cable ground lines may actually save the disk electronics in practice. Because completely without ground, you get -7V from red to yellow, a sure killer.
The question is of course how long they will last, as you rightly point out.
Daddy, what does this do? (Score:2)
I can easily predict the following scenario at my house:
Child: Daddy, What does this do? *CLICK*
Me (nearly simultaneously): NOOOOOOOOOooo
And the sound you now here is the computer crashing and me muttering curses under my breath...
Wow! (Score:2)
To think that all this time, I was simply hitting the key to get my BIOS boot device selection menu after installing the OSes I wanted individually!
Caddy (Score:2)
Re: (Score:2)
Wow, this is a really amateur. They're even switching the ground leads (it would be better NOT to switch them).
In fact, switching the ground lines may blow up your disks.
Re: (Score:2)
"Finally, I would observe that the whole thing appears to be a thinly veiled advertisement for the article author's attempt to sell premade 'SATA Switches'. Good luck with that, sir."
Slashdot and drugs don't mix! Or are you in this paranoid state on a regular basis?
Re: (Score:2)
My mobo is a couple of years old (MSI K9n), I currently choose first SATA for Debian, second for OS X and third for 2k8 Server.
The others are all data (which OS X and 2k8 share) and finally an external USB which houses music and tunes.
I keep thinking about swappable bays, switching ideas (like this one), etc... and always come back to the conclusion that it's already working just fine.
Not to mention, it looks a bit confusing to anyone who would try and boot m