Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
Data Storage Hardware Hacking Build Hardware

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."
This discussion has been archived. No new comments can be posted.

Build Your Own SATA Hard Drive Switch

Comments Filter:
  • by MrEricSir ( 398214 ) on Wednesday February 25, 2009 @04:38PM (#26986397) Homepage

    "You can expect a longer hard drive life span"

    Well, assuming you build it right.

  • by Captain Spam ( 66120 ) on Wednesday February 25, 2009 @04:39PM (#26986435) Homepage

    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 like it (Score:3, Informative)

    by John Napkintosh ( 140126 ) on Wednesday February 25, 2009 @04:39PM (#26986443) Homepage

    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)

      by 0racle ( 667029 )
      I would have to say that removable disk caddies would be more low tech, less error prone, simpler, and safer to both the drive and the drives warranty.

      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.
      • Well that's pretty darn easy, depending on what you want that abort button to DO. :)

      • Re: (Score:3, Informative)

        by jandrese ( 485 )
        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.
        • by LWATCDR ( 28044 )

          The connectors on drive caddies are rated for like 10k operations.

        • Re: (Score:3, Informative)

          by turgid ( 580780 )
          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.

            • Re:I like it (Score:4, Informative)

              by Culture20 ( 968837 ) on Wednesday February 25, 2009 @05:46PM (#26987631)
              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

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

              • by HTH NE1 ( 675604 )

                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

      • by nizo ( 81281 ) *

        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)

      by harrkev ( 623093 ) <kevin.harrelson@ ... om minus painter> on Wednesday February 25, 2009 @05:10PM (#26986883) Homepage

      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)

        by gweihir ( 88907 ) on Wednesday February 25, 2009 @05:44PM (#26987583)

        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)

          by harrkev ( 623093 )

          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)

            by gweihir ( 88907 ) on Wednesday February 25, 2009 @06:36PM (#26988809)

            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

          • by gweihir ( 88907 )

            Indeed.

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

  • by Anonymous Coward

    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.

    • by gweihir ( 88907 ) on Wednesday February 25, 2009 @05:46PM (#26987635)

      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.

  • They are cheap.
    They don't invalidate your drives warranty.
    Will do accomplish the exact same task.

    • by Hyppy ( 74366 )
      I'm not sure if I understand you correctly, but it seems like you're implying that this procedure is a) expensive, and b) invalidates the drive's warranty.

      I believe that it is neither of those.
      • by LWATCDR ( 28044 )

        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

  • by james_shoemaker ( 12459 ) on Wednesday February 25, 2009 @04:47PM (#26986557)

    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.

    • by Chabo ( 880571 )

      Well, if you include a few more pins, then you should be able to merely extend the current design to include the data cables...

      • by Fourier ( 60719 ) on Wednesday February 25, 2009 @05:13PM (#26986939) Journal

        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.

        • by Chabo ( 880571 )

          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.

          • by Fourier ( 60719 ) on Wednesday February 25, 2009 @06:34PM (#26988763) Journal

            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.

            • Comment removed based on user account deletion
              • 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.

      • Shouldn't be a problem.

        http://www.smcelectronics.com/switch.htm [smcelectronics.com] Search for SW20. Enough pins there for a pata cable.

    • by gabebear ( 251933 ) on Wednesday February 25, 2009 @05:02PM (#26986775) Homepage Journal
      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.

      Sata Hub (but not a switch)-> http://www.cooldrives.com/sahub5muussi.html [cooldrives.com]
    • 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.

        So I presume it won't do much harm.

        • by redelm ( 54142 )
          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?
          • 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.

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

    • by gweihir ( 88907 )

      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.

  • by TheThiefMaster ( 992038 ) on Wednesday February 25, 2009 @04:48PM (#26986569)

    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.

    • by Chabo ( 880571 )

      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?

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

        • by Chabo ( 880571 )

          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.

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

          • by Chabo ( 880571 )

            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)

    by jgtg32a ( 1173373 ) on Wednesday February 25, 2009 @04:49PM (#26986575)
    Do people really think that Grub is that hard or this just another case of because we can.
    • I find F8/F12 at reboot even easier.

    • by heson ( 915298 )
      Or that pressing F12 is a problem or that they buy too cheam mobos.
    • 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)

        by Pentium100 ( 1240090 )

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

  • by rmadmin ( 532701 ) <rmalekNO@SPAMhomecode.org> on Wednesday February 25, 2009 @04:53PM (#26986649) Homepage
    This is a power switch. Nothing more. Certainly not a sata switch. As much as I love soldering.. I'll stick with grub for this one. Then I can at least share my media across OSes.
  • by mr_da3m0n ( 887821 ) on Wednesday February 25, 2009 @04:54PM (#26986661) Homepage

    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.

  • by wkk2 ( 808881 ) on Wednesday February 25, 2009 @04:57PM (#26986709)
    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.
    • "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.

    • by mikael ( 484 )

      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...
    • Re: (Score:3, Interesting)

      by ILikeRed ( 141848 )
      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

  • by gweihir ( 88907 ) on Wednesday February 25, 2009 @05:37PM (#26987433)

    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.

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

      • by gweihir ( 88907 )

        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
  • by RGRistroph ( 86936 ) <rgristroph@gmail.com> on Wednesday February 25, 2009 @05:56PM (#26987853) Homepage

    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.

    • 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!
    • by pz ( 113803 )

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

  • 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

    • by gweihir ( 88907 )

      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.

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

  • 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!

  • At a prior job, we used to use IDE hard drives in caddies. When we wanted to change the operating system, we'd slip out the old drive and slip in the new one.

THEGODDESSOFTHENETHASTWISTINGFINGERSANDHERVOICEISLIKEAJAVELININTHENIGHTDUDE

Working...