Posted
by
timothy
on Wednesday February 25, 2009 @03:32PM
from the there-can-be-only-one dept.

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."

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.

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.

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.

The problem with swapping disks constantly is that most drive connectors (don't know about SATA specifically) are really only designed to be swapped a few hundred times at most. The mechanical stress of constantly unplugging and replugging the drive could very well lead to stress fractures in the connector, especially since they're often held on with just solder.

After just a couple of dozen swaps, SATA connectors will start to fail. Both the cables and the boards/drives. I know this from bitter experience "enhancing" and testing the very poorly-designed software upgrade mechanism for a storage appliance.

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.

SATA drive "caddie" manufacturers went cheap when they found out that SATA data and power plug-n-chug easily. Most are just a simple tray to hold-in/lever-out a drive. Even a lot of reasonably old SCSI caddies are this way (but the connectors are much more solid). They're nothing like the IDE/ATA caddies of yore.

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

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

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.

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.

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.

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.

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

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.

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.

Write caching aside though, I think most SATA drives 'support' hot swapping, so if one were to disable write caching, wouldn't there be no danger of corruption unless they were switched during an actual write?

Wouldn't be very practical for a boot drive, but you could 'hide' a porn drive from the wife/kids...

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.

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.

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

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.

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.

You can get high-speed ICs made for switching signals like this. Of course, you'd need to make a pretty good circuit board for this to not have problems, but there are quite a few low-volume board creation services out there that can make boards for you if you have a good circuit design ready.

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.

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.

I was excited about building an active SATA multiplexer... but this is just dumb. I did something similar a long time ago with IDE drives; instead of powering one drive down I had the switch attached to jumper positions so that the switch controlled master/slave.

If this is just a power switch, when what assurance is there it won't fry some drive? The most elementary rule in digital electronics is to supply power before data, and remove it after data.

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.

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.

SATA may well be designed to be hot pluggable. But what does that really mean? Hot pluggability can be assured by connector design -- data contacts are "deeper" inside than the power/ground which connect first and disconnect last. Even if they added isolating gates, where do those gates get power?

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.

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.

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?

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.

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.

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.

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.

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).

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.2.Export that sector to file (dd if=/dev/hda6 of=linux.bin bs=512 count=1) where/dev/hda6 is your linux partition.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.

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:)

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.

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.

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.

It's a neat hack, yes, but not really ideal. For all of the effort involved in setting up a switch like this, my solution of setting the first boot device to be the drive with my most frequently booted OS, and then just press F11 (on my board) to access the boot device menu if I want to boot to another drive is a lot easier.

Additionally, my method isn't restricted to just S-ATA drives. Not as cool, but a *tad* more functional...

It would be a nice feature on a motherboard to have four shunt pin switches that determines the first boot drive priority from the four SATA drives. They could ship the motherboard with just the drive 0 shunted, but then you could get a four position switch that would shunt the different pins. It would not have any effect if turned when the computer is on, but could signal the bios to the top boot priority during post (and just have the bios default to 0 if either multiple or no pins are shunted.)

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

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 Blackallways 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.

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.

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.

As this is Slashdot, I expected the article to be about an ATA over Ethernet switch that would let you build an array of drives to rival fibre-channel.
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

I wash I had some mod points for you. Actually messing with electronics is a great way of learning. It's not like the world would end if you fry a hard drive or a psu. Just don't use this setup for a critical system unless you have tried it elsewhere and know that it's stable.
But experimentation is fun and educational!

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

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