Turning off a hard drive

Silencing hard drives, optical drives and other storage devices

Moderators: NeilBlanchard, Ralf Hutter, sthayashi, Lawrence Lee

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Turning off a hard drive

Post by DerLjubljana » Fri Sep 28, 2007 4:46 pm

I'd like to preface this with a "thanks" to everyone on this site. Although I don't post, it has been a great resource for building my computer.

On to the topic at hand-

I currently have a near silent system (I'll be posting pics soon, but its not at the point that I'm happy with it yet), but my hard drive is way too loud. It's a Western Digital Caviar 250gb and it drowns out everything else in my rig. I want to replace it with a 2.5 inch drive, but since I game I want to keep the faster drive as well.

My plan is to buy a ~40gb 2.5 inch drive (I'm thinking of going for a Western Digital Scorpio. Are there any better?) and use that as my main drive. I'll install the OS, Firefox, etc, on the small drive. The second drive (the 250) will be used as my "noise" drive. This will have my music and games.
I want to have a switch to turn off the 250b drive, so it is only running when I need it (after using the "Safely Remove Hardware" thing).

Is there anything preventing this from working?

Thanks

Atmosper
Posts: 103
Joined: Thu Aug 17, 2006 7:14 am
Location: Västerås, Sweden

Post by Atmosper » Fri Sep 28, 2007 5:30 pm

How about the 250 GB in an external USB enclosure? Should accomplish what you're after.

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Fri Sep 28, 2007 6:08 pm

I want to use the hard drive I already own, so an external drive is the last resort.

jessekopelman
Posts: 1406
Joined: Tue Feb 13, 2007 7:28 pm
Location: USA

Post by jessekopelman » Fri Sep 28, 2007 9:08 pm

You don't need a hardware switch, just tell the operating system to shut it down after its been idle for some period. This is easily accomplished in Windows, Linux, and OSX . . .

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Sat Sep 29, 2007 12:14 am

Really? How do you do this? Also, how to you turn it back on?

Thanks

wwenze
Posts: 274
Joined: Mon May 23, 2005 12:04 am

Post by wwenze » Sat Sep 29, 2007 2:07 am

Power options under Control Panel -> Performance and Maintenance?

It's auto-off after the duration you set e.g. 5min of non-activity, you'll hear the HDD spin down and suddenly the room got quieter.

When you access the drive, it spins back up. -> Problem is, you never know when Windows will access the drive for whatever reason, and hence because of this, it is more safe to just put your drive in an enclosure and force it off.

And another plus for using enclosure, is that you can hide it deep under the table and control it with a power socket that is within reach. Believe me, you'll soon want your PC to be quieter too when listening to music. Caviar... gosh I know how loud that is. :roll:

tjoff
Posts: 25
Joined: Wed Sep 03, 2003 2:58 am
Contact:

Post by tjoff » Sat Sep 29, 2007 2:11 am

jessekopelman wrote:You don't need a hardware switch, just tell the operating system to shut it down after its been idle for some period. This is easily accomplished in Windows, Linux, and OSX . . .
Windows is just terrible on this so atleast in XP and earlier (no idea if Vista is any better) this is for most people a useless feature (drive gets turned on every now and then for *no* reason and sometimes never shuts down at all (you can change this in Control Panel->Display Properties->Screen Saver->Power)
Don't know for sure but the way I think it's supposed to work is that if a harddrive is idle for xx min then shut it down and start it again as soon as anything tries to access it.
Also that setting isn't drive specific but for all drives and theres nothing(?) you can do about that.

In linux (and OS X ?) you have hdparm which works like a charm. Too bad theres nothing like that for windows.
For years I've been frustrated by this and every now and then I decide to program such an application myself. Problem is I don't really know where to start (any pointers would be appretiated).

The limitations of such application would probably be:
Only drives thats connected to a SATA controllercard since PATA doesn't support hot-swap and windows freezes if a PATA drive becomes unresponsive.
You won't be able to shut down your OS-drive (not a problem in this case).

I'm making an enclosure for a power-switch for harddrives (handy when testing many drives) but I'd rather wan't this to be a software-solution.

(just realized that hdparm's source is available... I wouldn't put any faith in me getting it done though, I've been saying this for years, but I'll see what I can make out of it)

EDIT:
Ok, I should have thought of this...
In Cygwin you can install hdparm and for this only hdparm.exe and cygwin1.dll seems nessesary.
http://www.hackszine.com/blog/archive/2 ... ndows.html

And that seems to work. Unfortunately I can't test the functionality on this machine but there are options for setting an IDE drive to sleep and stand-by.

Depending on which setting you use you might need hot-swap. Also depening on what setting you might wan't to disconnect the drive ("remove it safely") first.

Think I've seen .bat script examples for safeling removing a drive so with that and hdparm.exe (and cygwin1.dll) one should (I think) easily be able to make a bat file that shuts a specific drive down or poweres it up.

EDIT2:
Don't play around too much with hdparm's other features unless you know what you're doing - they can probably mess things up quite a bit.

EndoSteel
Posts: 308
Joined: Sun Jan 25, 2004 7:50 am
Location: Moscow, Russia
Contact:

Post by EndoSteel » Sat Sep 29, 2007 8:52 am

tjoff
Only drives thats connected to a SATA controllercard since PATA doesn't support hot-swap and windows freezes if a PATA drive becomes unresponsive.
This is easily fixed using devcon.exe (a command line version of the Device manager). Everything goes fine if you run a script that uninstalls the drive from the system after you've switched the power off. The script looks as follows:

if exist <drive letter> (devcon disable <HWID>) else (devcon enable <HWID>)

As you can notice, it also installs the drive after powering up. Hardware IDs can be checked using devcon as well.

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Sat Sep 29, 2007 11:23 am

EndoSteel wrote: if exist <drive letter> (devcon disable <HWID>) else (devcon enable <HWID>)
So this script alone (using hdparm) is all I need?

I really appreciate the help.

EndoSteel
Posts: 308
Joined: Sun Jan 25, 2004 7:50 am
Location: Moscow, Russia
Contact:

Post by EndoSteel » Sun Sep 30, 2007 5:10 am

No, you also need a hardware power switch

Image

The script has nothing to do with hdparm, the proggie involved is devcon. You can download it here: http://www.modd1ng.com/files/devcon.exe

Here's a guide in Russian, I hope babelfish will make it readable.

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Sun Sep 30, 2007 11:56 am

@ EndoSteel: I get it now. I have a SATA drive, so I don't need that, right?

I quickly looked at hdparm on my brother computer (he uses Linux) and it only seems to be able to sleep IDE drives. Is this the case?

MoJo
Posts: 773
Joined: Mon Jan 13, 2003 9:20 am
Location: UK

Post by MoJo » Sun Sep 30, 2007 12:40 pm

eSATA might be a good option for you. Otherwise, you could try an internal SATA removable bay.

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Sun Sep 30, 2007 5:58 pm

What's an "internal SATA removable bay"? Both Google and Wikipedia returned nothing.

Another question. I have files I want to transfer from the drive I'm using nowto the 40gb. Is it possible, while I still have Windows installed on this one, to boot from the other drive and access these files?

MoJo
Posts: 773
Joined: Mon Jan 13, 2003 9:20 am
Location: UK

Post by MoJo » Mon Oct 01, 2007 2:31 am

http://www.aria.co.uk/Products/Componen ... ctId=27423

That sort of thing. You can get them with power switches on the front, or you could replace the key lock with a power switch. Or just pull the drive out 1cm to cut power.

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

Post by lobuni » Mon Oct 01, 2007 4:15 am

a quick google search gave me program called revosleep. Never heard of or used it before. looks simple, but i cant use because i only have 1 drive with windows on it.

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Mon Oct 01, 2007 9:49 pm

I just installed that and although I cant test it as I don't have the drive yet, it looks like it will work perfectly. Thanks!

Teema
Posts: 11
Joined: Tue Oct 02, 2007 1:35 am

Post by Teema » Wed Oct 03, 2007 4:56 am

Some notes to consider:
- Turning the hard-drive on/off repeatedly is probably the number 1 reason for hard drive failure.
- USB interface is significantly slower than IDE/SATA, last resort only.

eSATA probably gives you what you want.

For your primary "silent" drive, I'd recommend the various 160gb drives (Hitachi, WD, Seagate) with only 1 platter. They run light and silent.

MoJo
Posts: 773
Joined: Mon Jan 13, 2003 9:20 am
Location: UK

Post by MoJo » Wed Oct 03, 2007 6:14 am

I read that the on/off cycle thing reducing drive life was a myth. With very old drives that didn't automatically park the heads and were sensitive to heat it was an issue, but not any more.

Consider that 2.5" drives in particular are designed for that sort of thing, to save power. Most drives are likely to suffer some kind of read/write failure or electrical failure before they suffer a mechanical one.

jessekopelman
Posts: 1406
Joined: Tue Feb 13, 2007 7:28 pm
Location: USA

Post by jessekopelman » Wed Oct 03, 2007 1:17 pm

MoJo wrote:I read that the on/off cycle thing reducing drive life was a myth. With very old drives that didn't automatically park the heads and were sensitive to heat it was an issue, but not any more.

Consider that 2.5" drives in particular are designed for that sort of thing, to save power. Most drives are likely to suffer some kind of read/write failure or electrical failure before they suffer a mechanical one.
I'm inclined to think it is true, however not as important as one might think. It's the kind of thing that will make your drive last 8 years instead of 10 (assuming it doesn't die of a myriad of other causes first). I think it is still an issue for laptop drives, but one built into their prospective lifespan (i.e. one of the reasons they have a much shorter MTBF than most desktop drives is because all the extra power cycles are already factored in). Basically, if he keeps the power cycles bellow 5 per day, I doubt the typical owner would notice any loss of lifespan.

Teema
Posts: 11
Joined: Tue Oct 02, 2007 1:35 am

Post by Teema » Fri Oct 05, 2007 3:10 am

MoJo wrote:I read that the on/off cycle thing reducing drive life was a myth. With very old drives that didn't automatically park the heads and were sensitive to heat it was an issue, but not any more.

Consider that 2.5" drives in particular are designed for that sort of thing, to save power. Most drives are likely to suffer some kind of read/write failure or electrical failure before they suffer a mechanical one.
I believe that the spin-up cycle is a bit torturous on the drive (0->7900rpm). My external drives vibrate a little when they "boot up", but they never vibrate during operations. This most likely damages the bearings of the drive (my theory!), and obviously the higher the rpm, the more stress is applied. A lot of 2.5" drives are 5200rpm so they spin slower.


The Google hard drive study does show some evidence of on/off cycles affecting failure rate, but nothing conclusive yet.

imnotryan
Posts: 12
Joined: Sat Oct 06, 2007 11:56 am

Post by imnotryan » Sat Oct 06, 2007 5:06 pm

Hey all, first post!

I used hdparm to get my storage drive to spin down using" sudo hdparm -S 10 /dev/hda " and it worked like a charm.

Issue is that after restarting it doesn't do it, does anyone know how to make the change permanent?

Sorry for threadjack but those monkeys on ubuntuforums are no help!

EDIT: nevermind, got it!

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Mon Oct 08, 2007 9:37 pm

Well, I got everything set up (went with a Scorpio), but neither hdparm nor revosleep are working.

Whenever I try to sleep the drive with revosleep I get "Error Code 1". Since there isn't any documentation and the forum seems to be in German, I cant figure out what that means.

hdparm gives me the error "HDIO_DRIVE_CMD(standby) failed: Function not implemented".

However, it's still worth it if I have to manually unplug it. I just cut out the grilles and turned the fans down further- it's great!

mbetea
Posts: 140
Joined: Sun Feb 19, 2006 1:44 am
Location: Michigan, USA

Post by mbetea » Tue Oct 09, 2007 8:34 am

Just curious. Has anyone used Nvidia's feature of turning off/disconnecting drives? I know starting with the Nf4 chipset they had this ability but I never needed to use it myself. Just curious if that worked any better than using XP's options.

tomy
Posts: 28
Joined: Thu Sep 13, 2007 5:48 pm

Post by tomy » Tue Oct 09, 2007 11:51 am

theres a windows freeware that reads SMART data,...found it:

hddscan
http://hddguru.com/content/en/software/ ... 2-HDDScan/

in IDE features (i guess i dont know if it does SATA) theres a buttons for spin up, down, and power management with a 'idle timer'
i dont use it but i remember it worked to spin down the drive, im afraid to use it :P :)

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

Post by lobuni » Wed Oct 17, 2007 9:16 am

they updated revosleep to version 0.2.3 beta.
I added a second HDD to my system and it worked. The partitions disappeared from "My Computer" and i could hear it spin down almost instantly. note to anyone wanting to try this, you do it at your own risk and you need to have .NET Framework installed (you can download it straight from Microsoft's web-page).
To wake a drive up you need to right-click on revosleep in system-tray and unselect the corresponding letter (which seems to come from the first partition on the "sleeping" drive.)

MoJo
Posts: 773
Joined: Mon Jan 13, 2003 9:20 am
Location: UK

Post by MoJo » Wed Oct 17, 2007 9:35 am

Very interesting lobuni, it looks like an ideal solution for manually sleeping HDDs.

One other option would be to add switches for the drives you want to power down, and use SATA hot-plug capability to dismount them before powering them off. That way, they wouldn't spin up at all when you power the PC on until you need them.

It's a shame there are no automatic ways to make this work. This is a massive FAIL on Microsoft's part. Wake On Lan is just as bad. Ideally you could set up a machine with lots of disks, which could run those long BitTorrent downloads and power off all drives that were not in use. When not downloading it could go into S3 sleep state until someone accesses a network drive. Unfortunately neither HDD spin down not WoL work properly so as to allow this.

jackylman
Posts: 784
Joined: Sun May 22, 2005 8:13 am
Location: Pennsylvania, USA

Post by jackylman » Wed Oct 17, 2007 9:48 am

mbetea wrote:Just curious. Has anyone used Nvidia's feature of turning off/disconnecting drives? I know starting with the Nf4 chipset they had this ability but I never needed to use it myself. Just curious if that worked any better than using XP's options.
I have and it worked great. The only problem was that I needed to use the nVidia SATA drivers, which are known to be flaky (data corruption).

DerLjubljana
Posts: 33
Joined: Thu May 24, 2007 3:57 pm

Post by DerLjubljana » Wed Oct 17, 2007 6:12 pm

I tried the new version of revosleep, but I'm still getting "Error Code 1". I'm going to try the revosleep forum, although I don't know if anyone there will understand English...

EDIT
With the help of Google translator, I managed to learn a bit from the forum. Specifically, that the "Error Code 1" is a problem that they dont know the solution to.

This is a bit of a noob question, but it there some sort of 'hard drive driver' that I could update? Nothing seems to be working right (including the PowerBoost2k tool).

revoOo
Posts: 2
Joined: Wed Oct 24, 2007 5:48 am

Post by revoOo » Wed Oct 24, 2007 5:59 am

yes they will understand English ;)

revoOo
Posts: 2
Joined: Wed Oct 24, 2007 5:48 am

Post by revoOo » Wed Oct 24, 2007 6:00 am

plz visit http://revosleep.realspooky.de/ or http://revosleep.bboard.de/ to view the solution for this error.

sorry for double posting ... nice board system ;)

Post Reply