It is currently Fri Dec 19, 2014 1:46 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: batch scripts for turning off hard drives from windows
PostPosted: Mon Nov 30, 2009 12:05 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
Using HDDScan-s command line builder and mountvol, I figured out the following two commands to unmount a hard drive (it only works with additional drives, like D:\), and spins it down, then mount it back later. If I don't unmount it first, sooner or later there is always a windows program in the background which queries it, but unmounting takes care about that.

Here is the code, if you are interested.
spindown.bat
Code:
mountvol d:\ /d
"HDDScan.exe" "\\?\ide#diskst31000528as____________________________cc44____#5&1c80af87&0&2.0.0#{53f56307-b6bf-11d0-94f2-00a0c91efb8b}" -Z


spinup.bat
Code:
mountvol d:\ \\?\Volume{6708118c-cb14-11de-959d-806e6f6e6963}\


For the HDDScan part you can use the built in command line builder, for the mountvol, you can type mountvol d:\ /L to get the code.

Now my only problem is that using SpeenFan it triggers SMART values, which spins up the drive even if the partition is unmounted. I need to solve that, because except for that, this way if I ever buy a SSD I could just install OS to the SSD and only turn on those hard drives I need to use, meaning many TB's storage without any noise, when not needed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 30, 2009 8:26 am 
Offline

Joined: Wed Sep 06, 2006 11:48 pm
Posts: 575
Location: Finland
Nice short tutorial.

"Now my only problem is that using SpeenFan it triggers SMART values, which spins up the drive even if the partition is unmounted. I need to solve that"

That's the easy part. Just disable temperature monitoring of selected hard drives. Temperature monitoring of HDDs is performed by reading SMART data. HDD's internal SMART logics read temperature sensor continuosly, but the system can only read the temperature data by requesting all SMART data... and some of that is written on the platters, requiring HDD to spin up on temperature polling of SpeedFan.

By default, SpeedFan polls all HDDs at 1 minute interval. Just click on "Configure", then "Temperatures", and then untick all HDDs you might occasionally want to spin down, and confirm all made changes by clicking "OK".

Constant HDD temperature monitoring isn't required after initial monitoring of temperatures after installation of new drive to the system. Even then, I don't bother to check the temperatures unless I've made something out of the ordinary (sandwiching, enclosing, wrapping in sound-insulation (which unfortunately usually insulates heat as well), or with systems with ultra-low-airflow.

_________________
Antec 1200 | HX520W | Commando | Q6600 G0 @ 3.15GHz | Noctua NH-U12F | 8GB of RAM | HD 4670 (passive)
7 TB of storage: 1x 1st gen GreenPower (1TB), 1x 2nd gen GreenPower (1TB), 1x 3rd gen GreenPower (2TB), 1x 7200rpm F1, 2x 5400rpm F2 EcoGreen


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 01, 2009 3:48 am 
Offline

Joined: Tue Dec 01, 2009 3:42 am
Posts: 1
Location: USA
This is great, I can't believe there aren't more replies to this. Can this also work with a raid 5 of 3 disks? It's so annoying having lots of storage being spun up all the time on the whim of background tasks in windows for no good reason.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 01, 2009 7:54 am 
Offline

Joined: Sat Oct 17, 2009 11:16 am
Posts: 106
Location: Lancashire, UK
Holy flirking schnit, it works! zsero, you're a star as far as I'm concerned.

I've been slightly infuriated that Vista keeps spinning up my data drive when it should be idle, but haven't known of any way to keep it shut down. It took me a little bit of googling to figure out what mountvol is and how to access it, but once I'd got that done, it worked like a charm.

I'm guessing that my data drive may still be using power, but it'll be minimal, so I'll be saving on my electric now, as well.

One question. Do I need to have HDDScan on my drive for this to work, or can I delete it now?

My most sincere thanks to you, sir :D

_________________
My Rig (Tachikoma):M4A88T-M, Phenom II 555 @3.8, TRUE 120 Rev.C with Nexus 120, 4GB Crucial 1333 @1600, WD Caviar Blue 640GB, Asus 6850 DirectCU, Nexus 120mm x2, Antec Three Hundred Case, Antec High Current Gamer 520


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 01, 2009 11:03 pm 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
It's good to hear that it works!

Bad news for me is that it seems that my drives doesn't fully support the spindown feature (Seagate 7200.12), which means that when they spin up they will work, but start spinning down after 10 seconds of inactivity. A reboot solves the problem.

A good news for you might be that I found a more polished solution, called HotSwap!. It's a freeware program from Japan, which does it all, and it has a neat clickable interface on the system tray. It supports spindown, unmounting, everything.
http://mt-naka.com/hotswap/index_enu.htm

For HDDScan, you can put it in any folder, it doesn't need to be on the drive, and as far as I know it's portable (doesn't need to be installed, you can start it from any folder). But I would suggest for everyone to try out HotSwap! if it works on your system then it's a really cool one-click solution with no need for HDDScan or mountvol batch files.

EDIT: It seems that Windows 7's built in "turn off hard drives after ... min" works well on my drives, it must use a different command than what HDDScan and HotSwap! uses to turn off the drive.
Now my batch files are simply mountvol down - wait 1 minute - mountvol up, without the HDDScan part.

EDIT #2: Turning off HDD checkboxes doesn't work for me in SpeedFan, but I have found out that starting it with /NOSMARTSCAN option compeletely disables all SMART functions, hence it works very well for hard drives in a spindown.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 02, 2010 3:07 pm 
Offline

Joined: Fri Oct 31, 2008 1:42 am
Posts: 20
Location: Sweden
What about mac os x? It would really be great with individual spindown settings on each disk. I've searched a bit and this is what I've found so far (applescript):

Code:
on run {input, parameters}
   
   set vol to "example"
   tell application "Finder"
      if (exists disk vol) then
         do shell script "diskutil unmount /Volumes/" & vol
      else
         set device to do shell script "diskutil list |grep " & vol & " |awk '{print $6}'"
         do shell script "diskutil mount /dev/" & device
      end if
   end tell
   
   return input
end run


from http://forums.macnn.com/90/mac-os-x/396 ... -possible/

But an automatic shell script would be cooler, maybe something like this:
http://forums.freebsd.org/showthread.ph ... r#post5891

If it's possible to tweak for os x usage.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 7:56 am 
Offline

Joined: Wed Jan 21, 2009 10:58 am
Posts: 72
Location: Montreal
Wow, I have been looking for years to find a way to spin down my hard drive when im not using it! I can finally buy a SSD and not worry about space or anything, since half the time im just browsing the net, i dont really need all my other data.

Yes this post was useless but i still wanted to say thanks :D


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 27, 2010 5:30 pm 
Offline

Joined: Mon May 15, 2006 7:16 pm
Posts: 327
Location: Guelph, Canada
syrian_gamer wrote:
Wow, I have been looking for years to find a way to spin down my hard drive when im not using it! ...


I'm not sure I understand the need for this at this point in history?

I have a fairly old MB, circa 2005.
With the MB and WinXP and a BIOS setting, my HD powers down at a user selected time interval (mine is about 20 minutes I think.)

Am I missing something?


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 22, 2010 7:04 am 
Offline

Joined: Wed Jan 21, 2009 10:58 am
Posts: 72
Location: Montreal
NoiseFreeGuy wrote:
syrian_gamer wrote:
Wow, I have been looking for years to find a way to spin down my hard drive when im not using it! ...


I'm not sure I understand the need for this at this point in history?

I have a fairly old MB, circa 2005.
With the MB and WinXP and a BIOS setting, my HD powers down at a user selected time interval (mine is about 20 minutes I think.)

Am I missing something?


Yes, the problem is that something always spins it up, whether its explorer, or an AV. So essentially it wont power down and STAY powered down for very long.

On a side note, anybody having issues with this software? Specifically im having an issue where i spin down a drive and unmount, and after remounting it it keeps spinning down. I open my documents, it spins up, loads my documents, then spins right down again. Very annoying, very bad for the drive, very time consuming as well. any1 experience this?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 15, 2010 9:01 am 
Offline

Joined: Tue Jan 12, 2010 2:44 pm
Posts: 28
Location: EU
I've just come across this wonderful program called revoSleep.
You can download it here
http://revosleep.realspooky.de/

There's a x64 and x86 version.
I have been using it all day long, without a problem in Windows 7 Pro x64.

Basicly just install it, select which drive you want to shut down (it only shows the first partition in each HDD) and click GO!. That's it.

Just be sure to run it as Administrator.

I have copied all the files I use most often to another partition on my OS HDD. So now I just basicly spin down my backup drive (which also stores most of my media) and run a weekly backup. I was looking for a program like this for a very long time. I hope it can be of use to some.


Top
 Profile  
 
 Post subject: Virtual Hybrid drive?
PostPosted: Fri Jul 30, 2010 8:02 pm 
Offline
Friend of SPCR

Joined: Wed Jul 01, 2009 4:00 pm
Posts: 38
Location: Perth
Great contributions people! Thanks.

Now the next step is to only use spare capacity in your SSD when you're around and get the SSD to offload automatically onto your mechanical HDD when you're not. :wink:

"If a drive makes a noise when there's no one around to hear it, does it make any sound?" Silence.... 8)

Check out my previous question - no detailed answers unfortunately, perhaps someone could contribute.

Thanks!

http://www.silentpcreview.com/forums/vi ... highlight=


Top
 Profile  
 
 Post subject: Re:
PostPosted: Fri Feb 11, 2011 9:07 pm 
Offline

Joined: Sun Jan 25, 2004 2:01 am
Posts: 1087
nwbdan wrote:
I've just come across this wonderful program called revoSleep.
You can download it here
http://revosleep.realspooky.de/

There's a x64 and x86 version.
I have been using it all day long, without a problem in Windows 7 Pro x64.

Basicly just install it, select which drive you want to shut down (it only shows the first partition in each HDD) and click GO!. That's it.

Just be sure to run it as Administrator.

I have copied all the files I use most often to another partition on my OS HDD. So now I just basicly spin down my backup drive (which also stores most of my media) and run a weekly backup. I was looking for a program like this for a very long time. I hope it can be of use to some.


can you upload the program? the d/l doesn't work :(


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Thu Mar 24, 2011 10:02 am 
Offline

Joined: Sun Jan 25, 2004 2:01 am
Posts: 1087
I googled it and found it, it works great!


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Thu Mar 24, 2011 10:30 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
dan wrote:
I googled it and found it, it works great!


Maybe they got a huge hosting bill, because of the soundtrack on the page :-). I got google results for the 64-bit zip, but not for the 32-bit:
http://www.google.co.uk/search?sourceid ... TA_x64.rar

But they have a board, I'm sure if you post there someone will send it to you. I would be good to collect it and upload to ifile.it, for example.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Mar 29, 2011 8:06 am 
Offline

Joined: Sun Jan 25, 2004 2:01 am
Posts: 1087
zsero wrote:
dan wrote:
I googled it and found it, it works great!


Maybe they got a huge hosting bill, because of the soundtrack on the page :-). I got google results for the 64-bit zip, but not for the 32-bit:
http://www.google.co.uk/search?sourceid ... TA_x64.rar

But they have a board, I'm sure if you post there someone will send it to you. I would be good to collect it and upload to ifile.it, for example.


i have an iram card 4gb and a samsung 250gb and i can turn off the samsung hd when i read or surf the web. it works great.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sun May 15, 2011 1:17 am 
Offline

Joined: Tue Jan 25, 2005 8:46 am
Posts: 49
Sorry for bumping up this old thread. While the batch scripts work great for a few minutes, the unmounted drives still spin up after 5-10 minutes. I'm using Windows 7 -- has anyone encountered similar issues? :-(


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sat Oct 27, 2012 11:55 am 
Offline

Joined: Sat Jul 10, 2004 12:24 pm
Posts: 222
Location: US
I don't see the point to begin with. Isn't Windows own power management sufficient, spinning down idle hard drives after some configurable number of minutes?

_________________
Motherboard: ASUS P8Z77-M PRO CPU: Intel i5-3750K CPU Cooler: Scythe Mugen 3 Rev.B Memory: G.Skill Ares DDR3 1600 16 GB
Boot Drive: Samsung 830 SSD 128 GB Work Drive: WDC WD1001FALS 1 TB 7200 RPM Optical Drive: Samsung SH-222BB DVD-RW
Case: Fractal Design Define Mini Fans: 2 x FD 120mm front, Scythe 120mm PWM rear Power Supply: SeaSonic M12II 620


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sun Nov 11, 2012 4:30 am 
Offline

Joined: Thu Dec 22, 2011 12:47 am
Posts: 6
JJ wrote:
I don't see the point to begin with. Isn't Windows own power management sufficient, spinning down idle hard drives after some configurable number of minutes?


Not really, windows power management is pretty disappointing, random drive spin ups (MFT/ tracking.log) and to mention installers and similar programs spins up all drives when they check for free space. Noisewise really annoying also with the increased wait time to be allowed to continue when all drives spins up. Not possible to fix otherwise than these scripts, which are only useful if you want to use the drives only locally. :(


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sun Nov 11, 2012 8:56 am 
Offline

Joined: Sat Jul 10, 2004 12:24 pm
Posts: 222
Location: US
ezechiel1917 wrote:
JJ wrote:
I don't see the point to begin with. Isn't Windows own power management sufficient, spinning down idle hard drives after some configurable number of minutes?


Not really, windows power management is pretty disappointing, random drive spin ups (MFT/ tracking.log) and to mention installers and similar programs spins up all drives when they check for free space.


You're not going to avoid this by shutting down drives manually. They'll still spin up when accessed.

_________________
Motherboard: ASUS P8Z77-M PRO CPU: Intel i5-3750K CPU Cooler: Scythe Mugen 3 Rev.B Memory: G.Skill Ares DDR3 1600 16 GB
Boot Drive: Samsung 830 SSD 128 GB Work Drive: WDC WD1001FALS 1 TB 7200 RPM Optical Drive: Samsung SH-222BB DVD-RW
Case: Fractal Design Define Mini Fans: 2 x FD 120mm front, Scythe 120mm PWM rear Power Supply: SeaSonic M12II 620


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sun Nov 11, 2012 9:22 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
JJ wrote:
ezechiel1917 wrote:
JJ wrote:
I don't see the point to begin with. Isn't Windows own power management sufficient, spinning down idle hard drives after some configurable number of minutes?


Not really, windows power management is pretty disappointing, random drive spin ups (MFT/ tracking.log) and to mention installers and similar programs spins up all drives when they check for free space.


You're not going to avoid this by shutting down drives manually. They'll still spin up when accessed.


33, what these scripts do is they unmount the drives. They won't be able to be accessed. Their drive letter will disappear from windows, until mounted back. Only SMART utilities can access them this way.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Sat Jan 26, 2013 3:12 am 
Offline

Joined: Fri Mar 14, 2008 5:18 am
Posts: 506
Location: London, UK
Has anyone found a way to implement this with a simple powershell script for Windows 7? Just pop a file on the Desktop and execute whenever would be ideal.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Mon Aug 05, 2013 8:47 am 
Offline

Joined: Thu Dec 22, 2011 12:47 am
Posts: 6
I hate Windows power management, this used to work when I initially tested it, however I'm using Ubuntu for samba server where spin down actually works like it's supposed to.
When I played again with Windows last week drives were randomly spinning up even though they were offline in disk management...
svchost.exe still randomly accessed ntfs metadata ($Mft, $LogFile, $Bitmap etc) of offline drives. There seems to be no way to disable this behaviour.

I wish I could have Windows based server (I need various windows applications) with only SMB access waking up drives :((
I really don't get it. Why do you have drive power management in Windows when it is not working properly :(


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Mon Aug 05, 2013 10:17 pm 
Offline

Joined: Mon May 16, 2011 11:23 am
Posts: 688
Location: Germany
ezechiel1917 wrote:
I hate Windows power management, this used to work when I initially tested it, however I'm using Ubuntu for samba server where spin down actually works like it's supposed to.
When I played again with Windows last week drives were randomly spinning up even though they were offline in disk management...
svchost.exe still randomly accessed ntfs metadata ($Mft, $LogFile, $Bitmap etc) of offline drives. There seems to be no way to disable this behaviour.

I wish I could have Windows based server (I need various windows applications) with only SMB access waking up drives :((
I really don't get it. Why do you have drive power management in Windows when it is not working properly :(


There are a lot of services doing "hidden" things on your HDDs when system is idle. Ever configured some of them? Because in most cases you'll find out that e. g. Windows Search is perriodically updating index or something similar.

Just blaming windows for svchost.exe lets me guess you do not know what exactly that .exe does.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 2:32 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
If you don't have SMART monitoring tools active (accesses hard drives by direct access, not by volumes / partition), no buggy defrag utility, no buggy virus scanner, actually Windows 7 is really nice with hard drive management.

Some time ago I stopped using these scripts and just let Windows 7 power up and down the harddrives after 2 min, and I can work ours without hard drives spinning up.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 4:48 am 
Offline

Joined: Thu Dec 22, 2011 12:47 am
Posts: 6
Good for you. Wish I could do that... Something is still accessing my drives and I'm unable to do anything with it more than identifying that NTFS metadata are being accessed for some reason. I don't have any smart sw (unless it is integrated in Intel RST SATA driver by default...) disabled defrag/windows search/superfetch and some other suspectful services but that didn't really help. Even if I could nail it down, it won't prevent regular spin-up of all drives when I run any software installer etc, will it?

I will appreciate any help if you think it is possible to run windows based file server, where only smb access actually wake up that specific drive. I've spent many hours with windows desktop OS and it curently seems impossible to do so.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 6:25 am 
Offline

Joined: Mon May 16, 2011 11:23 am
Posts: 688
Location: Germany
Windows Server 2008 and 2012 were never designed to save power.

What i do not understand is the fact that you WANT your HDDs to spin down. In dependance on how many times the HDDs will have to be powered up and need a small power consumption peak to do so vs. running constantly at a given power consumption, you might end up using more power.

As HDDs typically do not consume high amounts of power, i wonder as to why exactly they have to spin down.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 7:20 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
Pappnaas wrote:
Windows Server 2008 and 2012 were never designed to save power.

What i do not understand is the fact that you WANT your HDDs to spin down. In dependance on how many times the HDDs will have to be powered up and need a small power consumption peak to do so vs. running constantly at a given power consumption, you might end up using more power.

As HDDs typically do not consume high amounts of power, i wonder as to why exactly they have to spin down.


^ Hint: Maybe because the name of this site starts with SILENT?


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 8:59 am 
Offline

Joined: Thu Dec 22, 2011 12:47 am
Posts: 6
zsero wrote:
Pappnaas wrote:
Windows Server 2008 and 2012 were never designed to save power.

What i do not understand is the fact that you WANT your HDDs to spin down. In dependance on how many times the HDDs will have to be powered up and need a small power consumption peak to do so vs. running constantly at a given power consumption, you might end up using more power.

As HDDs typically do not consume high amounts of power, i wonder as to why exactly they have to spin down.


^ Hint: Maybe because the name of this site starts with SILENT?


:P Something one would never guess...? I don't care about power consumption, just want silence unless data requested over network. Also I was specifically talking about desktop os.


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 9:10 am 
Offline

Joined: Sat Jul 10, 2004 12:24 pm
Posts: 222
Location: US
Even in the name of silence, I can't believe anyone would bother manually running a script to shut down a drive instead of letting the OS do it a couple minutes later.

To say that you're overthinking this thing would be a gross understatement. Try not to let your OCD get the better of you.

_________________
Motherboard: ASUS P8Z77-M PRO CPU: Intel i5-3750K CPU Cooler: Scythe Mugen 3 Rev.B Memory: G.Skill Ares DDR3 1600 16 GB
Boot Drive: Samsung 830 SSD 128 GB Work Drive: WDC WD1001FALS 1 TB 7200 RPM Optical Drive: Samsung SH-222BB DVD-RW
Case: Fractal Design Define Mini Fans: 2 x FD 120mm front, Scythe 120mm PWM rear Power Supply: SeaSonic M12II 620


Top
 Profile  
 
 Post subject: Re: batch scripts for turning off hard drives from windows
PostPosted: Tue Aug 06, 2013 9:48 am 
Offline

Joined: Mon Jan 07, 2008 3:51 pm
Posts: 95
Location: Edinburgh, Scotland
JJ wrote:
Even in the name of silence, I can't believe anyone would bother manually running a script to shut down a drive instead of letting the OS do it a couple minutes later.

To say that you're overthinking this thing would be a gross understatement. Try not to let your OCD get the better of you.


JJ, some people are using scripts because the OS is for some reason never wants to turn off a drive. In this case a script helps.

Yes, Linux is much better for very specific tweakings like these. In Windows you just cannot do anything if some process accesses your harddrive.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group