Program to keep external drive from going to sleep/head parking

bbhaag

Diamond Member
Jul 2, 2011
7,094
2,530
146
I need a program that will keep my external drive from going to sleep/head parking. Basically I want it spun up all the time so there is no latency when I open a file on the drive. So far I've tried keepalivehd and it keeps crashing or giving write errors. I've also tried the Win10 power settings options but that didn't seem to help either. I tried googling and searching the forum but didn't find anything. I guess I just don't know what key terms to search for...

Does anyone know of a program that will keep my external hdd from going to sleep? The OS is Win10 and the hdd is an external Seagate 4tb connected through usb3 via a Renesas chipset.
 

lxskllr

No Lifer
Nov 30, 2004
59,064
9,458
126
How about a script that writes, then deletes a small amount of data at a prescribed interval?
 

bbhaag

Diamond Member
Jul 2, 2011
7,094
2,530
146
I think that is what keepalivehd does except it doesn't appear to be Win10 friendly. I'm no good at writing batch files other wise I would try writing one on my own like you suggested. I'd also like something with a nice gui interface if possible.
 

lxskllr

No Lifer
Nov 30, 2004
59,064
9,458
126
You shouldn't need a gui. That's the kind of thing you set and forget. You might be able to do something interesting with windows task scheduler. See if you can set it to delete *.retard(or any file that has no chance of existing every n minutes. That'll access the drive, and keep it from sleeping.
 

Red Squirrel

No Lifer
May 24, 2003
69,680
13,317
126
www.betteroff.ca
I had to do this for green drives that I used for a raid array (bad idea, won't do that again). They kept going to sleep which then basically is like a drive failure to the raid. They eventually all drop out and the raid array basically fails and has to be rebuilt. (you don't necessarily lose data though) I ended up just writing a simple script that does a dir and outputs the output to a temp file on the drive. Then it reads it, then deletes it. Runs once a minute. It's hopefully enough I/O to stop it from sleeping. It's worked ok so far... In my case it's Linux but should be similar in windows.

Something like:
Code:
dir F: > F:\~diskact.tmp
type F:\~diskact.tmp
del /y F:\~diskact.tmp

Where F is the drive.

My DOS is rusty so I may possibly have those commands slightly wrong. First line just lists the directory, and outputs that to a file. That causes some disk activity as it has to read the directory, and then it writes it to the file which is more activity. Second line reads that file. Then the last line deletes it.

Technically I think you could get away with just the dir part but I like to make sure it also writes to the disk as it might go to sleep anyway if it does not get written to enough. you can shove that file anywhere you want too, like a hidden folder. That way you won't see it.

Then you would just set that as a scheduled task to run every minute or other interval of choice.
 

bbhaag

Diamond Member
Jul 2, 2011
7,094
2,530
146
Thanks for the suggestion C1. I tried it out over night and it appears to work ok. I was hoping for something a little more refined though. Instead of write times being in the minutes I want it to be in seconds and I don't like how it only minimizes to the taskbar. I would like a program that minimizes to the action center on close or minimize and is also able to be automatically enabled and minimized to the action center on start.

I understand I might be a little picky but keep the suggestions coming.
 
Last edited:

bononos

Diamond Member
Aug 21, 2011
3,923
181
106
..........
Does anyone know of a program that will keep my external hdd from going to sleep? The OS is Win10 and the hdd is an external Seagate 4tb connected through usb3 via a Renesas chipset.
If its just the disk APM (power management) which is causing the heads to park/sleep and not windows/drivers for the external caddy, then you could run utilities to modify the APM behavior or flash a hacked firmware that does the same thing. Or you could write a small bat/shell program that forces the disk to work.

HDparm is a common linux tility that can fix head parking times, theres a windows port but I don't know whether its legit. Or maybe Crystaldiskinfo could work, I don't know if it works for current drives.

For the small batch/shell script, I would prefer touching a hidden file that you have somewhere since the goal is to minimize disk activity and just keep it spinning. No need for a dir. Use your ears and time how long it takes for the disk to spin down. If it takes 90 seconds, then run the batch file every 89s. Hopefully it takes longer than a minute because thats the smallest period that windows task scheduler can handle.
 

tommo123

Platinum Member
Sep 25, 2005
2,617
48
91
nosleephd is the one i use. run 2 instances if you have more hard drives than 1 instance can list.

it writes a text file to the drive every specified number of minutes (you choose). works fine but the "start at logon" or whatever option doesn't work so i have to remember to open it twice each bootup.
 

Hugh Jass

Golden Member
Nov 17, 2011
1,537
23
81
Your Seagate external drive didn't come with Dashboard software that allows you to change some settings on the drive...one of those being telling the drive when to go to sleep or to not go to sleep at all?

My old 3TB external Seagate did.
 

Scooby Doo

Golden Member
Sep 1, 2006
1,034
18
81
Wouldn't just doing a directory listing be plenty to keep the drive active? Or a tiny tiny little app that checks disk space occasionally?
 

Elixer

Lifer
May 7, 2002
10,371
762
126
HDparm is a common linux tility that can fix head parking times, theres a windows port but I don't know whether its legit. Or maybe Crystaldiskinfo could work, I don't know if it works for current drives.
Crystakdiskinfo works fine for APM on every device I have tried it on.
While polling the drive is one way to do it, I don't think adding "work" for the HD to do is a good thing. Just doing reads, after awhile, all that is cached anyway, and you won't be really doing much of anything.
Writing random data is another option, but, again, I don't like seeing HD's do more work than is necessary.
 

rossathomeuk

Junior Member
Aug 8, 2022
1
0
6
simple fix for you

Assuming your using windows,Paste the batch file below, then add the batch file shortcut to your startup group and make it maximized or minimized according to your preferences.
All you need to do is change the Drive letters in your bat file of the 1st 2 lines that is ( LOWER CASE t) in my batchfile to your drive letter your using.

The Capital T for Timeout is a command for the 30 second timeout wait period, so leave that to the letter T. do not change that. you could change the 30 to tighter if you want

I found that this fixed my external drives that automatically went to to sleep mode and vanished from My computer in Windows that when I copied 500 gigs of files to that drive, it would timeout and goto sleep so this fixed it.
I found it on some forum site so I am not the creator of this.

You can than repeat this for other drives you have in the same batch file

All it does is to create and write an ultra-small file called HDDActive.txt to the drive letter, then instantly deletes that same file,it then waits 30 seconds , then repeats this constantly every 30 seconds forever.

if its specifically a USB device falling asleep then check USB mass storage advanced power management .
see here https://answers.microsoft.com/en-us...entering/57a268e2-68a3-4680-a738-91f10b94a6be

you may want to use the batch file here




@ECHO off
:start

REM --- Changes the drive letter below to match your HDDs. To add another drive replicate the copy and del lines ---
copy NUL t:\HDDActive.txt
del t:\HDDActive.txt

TIMEOUT /T 30 /NOBREAK
goto start
 
Last edited: