Using a hardware switch to disable a hard drive
Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee
-
- Posts: 7
- Joined: Mon Apr 05, 2010 2:21 pm
- Location: US
Using a hardware switch to disable a hard drive
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?
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?
-
- Posts: 266
- Joined: Wed Mar 31, 2010 8:19 am
- Location: OV, The Netherlands
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.
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.
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.
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.
-
- Posts: 7
- Joined: Mon Apr 05, 2010 2:21 pm
- Location: US
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.
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.
Re: Using a hardware switch to disable a hard drive
"Yet" hints that you're interested in becoming competent.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.
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.
-
- Posts: 404
- Joined: Sun Jul 04, 2004 9:18 pm
- Location: Illinois, USA
The best thing to do is just cut power to the HD. Then it is dead, as if it wasn't there.Jay_S wrote:But as long as power is attached, wouldn't the HDD still spin up?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.
-
- Posts: 266
- Joined: Wed Mar 31, 2010 8:19 am
- Location: OV, The Netherlands
That wont be a problem because the disk looks dead when it has no power.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.
And why dont you just switch on the black wires. Then you just need one switch?
-
- Posts: 7
- Joined: Mon Apr 05, 2010 2:21 pm
- Location: US
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.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?
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.
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.
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.
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.
-
- Posts: 7
- Joined: Mon Apr 05, 2010 2:21 pm
- Location: US
worked
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!
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!
Re: worked
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).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.)
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.
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.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.
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
-
- Posts: 292
- Joined: Sat Jul 14, 2007 10:11 am
- Location: Perth, Western Australia