Using a hardware switch to disable a hard drive

Silencing hard drives, optical drives and other storage devices

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

Post Reply
vvlonghorn
Posts: 7
Joined: Mon Apr 05, 2010 2:21 pm
Location: US

Using a hardware switch to disable a hard drive

Post by vvlonghorn » Mon Apr 19, 2010 8:35 am

I recently built a HTPC (with hardware suggestions from SPC, thanks!) and am very pleased with it.

However, even though I will be using XBMC live off a USB drive, I have chosen to have a copy of XP on a secondary hard drive (IDE) as a backup plan, since i'm not fully competent with linux yet.

My question is this, does anyone have any suggestions/warnings about wiring a DPDS switch on the 4 wire molex connector of the second HD, and installing the switch on the back of the case? That way when i use the HTPC with XBMC i can just keep the windows hard drive turned off to save a little noise/heat/power consumption.

I have heard people suggest using a usb enclosure or adapter but I don't want to go through the hassle of trying to get windows to boot from a usb drive, and since i'm also using the drive as a backup i don't want to have the bottleneck from USB.

Also, I have heard that even with no power, the motherboard can still get glitchy when sensing a hard drive plugged into the IDE bus, but not having it respond.

Any thoughts on implementation or arguments against this?

BlackWhizz
Posts: 266
Joined: Wed Mar 31, 2010 8:19 am
Location: OV, The Netherlands

Post by BlackWhizz » Mon Apr 19, 2010 9:05 am

Well its possible. BUT:

The HDD can only be powered on/off before booting up the pc.

About the switches, its the most easiest one to switch grounds. When your hdd is powered on the switch connects the grounds and when the hdd is off you just disconnect the grounds by switching the switch off.

Srry if its sounds weird. My english is just weak because its not my main language.

ces
Posts: 3395
Joined: Thu Feb 04, 2010 6:06 pm
Location: US

Post by ces » Mon Apr 19, 2010 9:32 am

Mitron has such a switch. See:
http://www.performance-pcs.com/catalog/ ... s_id=25675

I use one. It is a handy thing to have. The best way to do double booting.

vvlonghorn
Posts: 7
Joined: Mon Apr 05, 2010 2:21 pm
Location: US

Post by vvlonghorn » Mon Apr 19, 2010 10:06 am

thanks for the quick reply guys. I thought about wiring the switch with the negative or positive leads but i don't think it would matter, especially with DC. I am considering the fact that a 4-pin molex has 12V and 5V, which is why i would use a double pole switch.

Thanks for the link CES, but since i'm just turning on/off one hd, if i go this route, I might as well save the extra $25, and do it myself. After looking at the link, it looks like their switch just modifies the power cables and not the data cables, so my switch should do the same thing.

The biggest concern I had was having a hd plugged into the motherboard, but with no power. Has anyone had any problems with stability when doing this, or is it a moot point that probably won't pop up.

Jay_S
*Lifetime Patron*
Posts: 715
Joined: Fri Feb 10, 2006 2:50 pm
Location: Milwaukee, WI

Re: Using a hardware switch to disable a hard drive

Post by Jay_S » Mon Apr 19, 2010 10:16 am

vvlonghorn wrote:However, even though I will be using XBMC live off a USB drive, I have chosen to have a copy of XP on a secondary hard drive (IDE) as a backup plan, since i'm not fully competent with linux yet.
"Yet" hints that you're interested in becoming competent.

I've used XBMC Live from USB as well. I think it's a really cool idea. But for the linux beginner XBMC Live might be frustrating. If memory serves, it's a really cut-down version of Ubuntu. There's a GDM (log out of XBMC and issue 'startx' from console), but there's no web browser. So it's difficult to search for help online.

IMO, the regular Ubuntu desktop is much easier to use, understand, and learn from - especially for a beginner. Installing XBMC is easy, and if/when you run into problems, you have a web browser to search online for help.

And if you're installing regular Ubuntu, you might as well just keep your current HDD as-is.

swivelguy2
Posts: 404
Joined: Sun Jul 04, 2004 9:18 pm
Location: Illinois, USA

Post by swivelguy2 » Mon Apr 19, 2010 10:17 am

Most motherboards allow you to enable/disable individual SATA ports in the bios. So that's another option - a little slower but perhaps easier and cheaper.

Jay_S
*Lifetime Patron*
Posts: 715
Joined: Fri Feb 10, 2006 2:50 pm
Location: Milwaukee, WI

Post by Jay_S » Mon Apr 19, 2010 10:40 am

swivelguy2 wrote:Most motherboards allow you to enable/disable individual SATA ports in the bios. So that's another option - a little slower but perhaps easier and cheaper.
But as long as power is attached, wouldn't the HDD still spin up?

ces
Posts: 3395
Joined: Thu Feb 04, 2010 6:06 pm
Location: US

Post by ces » Mon Apr 19, 2010 10:43 am

Jay_S wrote:
swivelguy2 wrote:Most motherboards allow you to enable/disable individual SATA ports in the bios. So that's another option - a little slower but perhaps easier and cheaper.
But as long as power is attached, wouldn't the HDD still spin up?
The best thing to do is just cut power to the HD. Then it is dead, as if it wasn't there.

BlackWhizz
Posts: 266
Joined: Wed Mar 31, 2010 8:19 am
Location: OV, The Netherlands

Post by BlackWhizz » Mon Apr 19, 2010 12:24 pm

vvlonghorn wrote:thanks for the quick reply guys. I thought about wiring the switch with the negative or positive leads but i don't think it would matter, especially with DC. I am considering the fact that a 4-pin molex has 12V and 5V, which is why i would use a double pole switch.

Thanks for the link CES, but since i'm just turning on/off one hd, if i go this route, I might as well save the extra $25, and do it myself. After looking at the link, it looks like their switch just modifies the power cables and not the data cables, so my switch should do the same thing.

The biggest concern I had was having a hd plugged into the motherboard, but with no power. Has anyone had any problems with stability when doing this, or is it a moot point that probably won't pop up.
That wont be a problem because the disk looks dead when it has no power.

And why dont you just switch on the black wires. Then you just need one switch?

vvlonghorn
Posts: 7
Joined: Mon Apr 05, 2010 2:21 pm
Location: US

Post by vvlonghorn » Mon Apr 19, 2010 12:43 pm

BlackWhizz wrote: That wont be a problem because the disk looks dead when it has no power.

And why dont you just switch on the black wires. Then you just need one switch?
I didn't want to do that because, while not 100% sure it would matter, I didn't like the idea of connecting the ground wires of the 5V and 12V lines in a single pole switch and having their circuits cross. Luckily, the Double Pole Single Throw switch is designed for just this occasion where you can use one switch to open/close two circuits at the same time while keeping them completely isolated of each other.

JamieG
Posts: 822
Joined: Fri Dec 26, 2008 10:31 pm
Location: Melbourne, Australia

Post by JamieG » Mon Apr 19, 2010 3:52 pm

If what you are trying to accomplish is a switch that determines whether a second HDD (in addition to your primary linux hdd) is allowed to turn on at boot, I've done something similar before.

I did this with a SATA drive before switching to an external USB HDD cage with an on/off switch.

I used a four pole switch with a double throw action (no centre off option) toggle switch from here and wired the molex power connections using a molex extension cord as follows

- all four molex wires that would come from the PSU side to the four poles on one side of the switch
- all four molex wires that would go to a molex to SATA adapter to connect to the hdd to the centre four poles that is the 'output' of the switch
- I did not wire anything to the four poles on the other side of the switch.

Basically, if the switch is flicked one way, the power from the PSU is allowed to flow through to the centre outputs and power the HDD. If the switch is thrown the other way, there is no input power from the HDD and it did not boot. Since this was a secondary HDD, I had no problems as to whether or not it was included in the boot sequence.

I only ever flicked the switch when the computer was powered down, never when it was on.

The mitron bay device ces linked to is more advanced, in that it allows you to choose whether you want to boot from one hdd, the other hdd or have both powered and your user preferences select which is the boot drive.

An old picture of my system with the switch is here, although you can't really see much.

Hope that helps! Feel free to PM me if you want more detail.

KayDat
Posts: 222
Joined: Wed Aug 15, 2007 7:37 pm
Location: Melbourne, Victoria, Australia

Post by KayDat » Mon Apr 19, 2010 4:55 pm

DPDT switches should work fine to cut power. Just make sure you have your computer BIOS setup to have the SATA controller as ACHI, so it supports hot-swapping. If you don't see ACHI, try looking for a SATA setting that has "legacy" support or "SATA as IDE", and make sure it isn't set to legacy. This way you can turn the drive on and off and the OS will detect it, just like a USB drive.

Edit: Wait, so you have IDE or SATA? Cutting power to a SATA drive should be fine, but yes, I have encountered some mobos where they do have issues with unpowered IDE drives. The problem I had was that the computer would take forever to boot, probably trying to look for the drive.

vvlonghorn
Posts: 7
Joined: Mon Apr 05, 2010 2:21 pm
Location: US

worked

Post by vvlonghorn » Fri Apr 23, 2010 12:25 pm

Thanks for all the advice guys.

To give you a heads up, it almost works perfectly! The hardware side works as well as I could expect, and now my only issue is with the BIOS but it's not really fixable.

It turns out that when I set the boot order, once a device gets unplugged and the computer gets turned on, if you plug the drive back in at a later time it gets sent to the bottom of the boot order.

So I can disable the HD, boot into XBMC and be on my way. But when I want to get back to windows I have to go into the bios and re-add it at the top of the list because even if i take out the USB drive that XBMC is on, it still tries to boot from the other HD first (which it either hangs on or just takes forever.)

But i guess i'll just have to deal with it. Thanks guys!

Jay_S
*Lifetime Patron*
Posts: 715
Joined: Fri Feb 10, 2006 2:50 pm
Location: Milwaukee, WI

Re: worked

Post by Jay_S » Fri Apr 23, 2010 1:46 pm

vvlonghorn wrote:But when I want to get back to windows I have to go into the bios and re-add it at the top of the list because even if i take out the USB drive that XBMC is on, it still tries to boot from the other HD first (which it either hangs on or just takes forever.)
Is the drive available if you hit F12 (or whatever your MB's boot menu hotkey happens to be)? On my gigabyte boards, the F12 option is right away during POST, and is a one-time thing (doesn't change the default boot order in BIOS).

confusion
Posts: 56
Joined: Sat Apr 12, 2003 10:06 am

Post by confusion » Tue Apr 27, 2010 11:21 pm

BlackWhizz wrote:And why dont you just switch on the black wires. Then you just need one switch?
I wouldn't trust that to work, since the entire computer chassis is grounded and the hard drive housing is connected to that. There may well still be a ground path to the circuitry.

lobuni
Posts: 73
Joined: Thu Aug 23, 2007 2:33 am

Post by lobuni » Wed Apr 28, 2010 3:01 am

I'll admit I didn't read the whole thread but I'll post anyway :)

Have you tried to spin them down using hdparm in Linux( In Windows you would have to use revoSleep)

Googling "hdparm spin-down unmount" will get you posts with mixed results. You might also want to try searching hdparm here in the forums also.

alecmg
Posts: 204
Joined: Thu Mar 13, 2008 5:56 am
Location: Estonia

Post by alecmg » Wed Apr 28, 2010 4:56 am

lobuni wrote:Have you tried to spin them down using hdparm in Linux( In Windows you would have to use revoSleep)

Googling "hdparm spin-down unmount" will get you posts with mixed results. You might also want to try searching hdparm here in the forums also.
Yes, that would be my suggestion also.
You just don't mount the HDD and issue spindown order with hdparm. There will be trace more power consumption that with hardware switch, but its really negligeble

theycallmebruce
Posts: 292
Joined: Sat Jul 14, 2007 10:11 am
Location: Perth, Western Australia

Post by theycallmebruce » Wed Apr 28, 2010 5:34 pm

For the price, that Mitron switch looks like a winner to me.

Post Reply