How to prevent external HD to spin down

Kernels & Hardware, configuring network, installing services

How to prevent external HD to spin down

Postby fred44nl » 2019-01-24 13:08

on my machine, which s running Debian 9.6, I have an external usb-hdd - Toshiba Canvio 1TB usb3
works all very well, but this usb-hdd spins down very quickly.

how can I stop my usb-hdd from spinning down ??

what I've done so far is issue commands using hdparm.
Code: Select all
sudo hdparm -B255 /dev/sdb

this should turn off Power Management

Code: Select all
sudo hdparm -S0 /dev/sdb

this should turn off spinning down, but it does not.

I added the following to end of /etc/hdparm.conf (and rebooted):
/dev/sdb {
apm = 255
spindown_time = 0
}


but after some time, I always get this:
fred44nl@Debian:~$ sudo hdparm -C /dev/sdb

/dev/sdb:
drive state is: standby


smartctl tells me:
APM feature is: Disabled


what else is there ??
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby Segfault » 2019-01-24 13:41

What else is there? Braindead manufacturers of hardware who think their device should control the drive instead of OS. Maybe they think their "power saving" is going to save the world. Probably the only remedy is a script that performs reads on the drive often enough to prevent it from spinning down.
Segfault
 
Posts: 903
Joined: 2005-09-24 12:24

Re: How to prevent external HD to spin down

Postby fred44nl » 2019-01-24 14:44

does this mean that I have to do something with cron ??
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby Segfault » 2019-01-24 15:15

https://www.startpage.com/do/dsearch?qu ... ge=english

Hint. Searching the net is faster than waiting for someone to do it for you. Enjoy.
Segfault
 
Posts: 903
Joined: 2005-09-24 12:24

Re: How to prevent external HD to spin down

Postby fred44nl » 2019-01-25 08:43

Segfault wrote:Hint. Searching the net is faster than waiting for someone to do it for you. Enjoy.


yes, I know :)
found the default spinning down delay, which is 3 mins.
so, I became root for a while and did ctrontab -e
added the following line at the bottom:
Code: Select all
* * * * * /bin/touch /dev/sdb &>/dev/null


this seemed to work well, but after a few hours the drive was in standby again.
so now I have to find another command :)
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby fred44nl » 2019-01-26 10:49

I change the crontab line to:
Code: Select all
* * * * * /sbin/hdparm -S0 /dev/sdb &>/dev/null


seems to do the job :)
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby fred44nl » 2019-02-05 09:01

this morning, my system crashed, for no reason.
so, I will remove this crontab for a while.

any suggestions for a different crontab line are welcome :)
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby arzgi » 2019-02-06 10:32

fred44nl wrote:this morning, my system crashed, for no reason.
so, I will remove this crontab for a while.

any suggestions for a different crontab line are welcome :)


Usually drives spin down to save energy, if you have not changed anything related to that after installation, check bios/uefi settings.

Spinning down should not cause any problems, the drive should spin up when needed automatically.
arzgi
 
Posts: 458
Joined: 2008-02-21 17:03
Location: Finland

Re: How to prevent external HD to spin down

Postby fred44nl » 2019-02-06 11:50

arzgi wrote:Spinning down should not cause any problems, the drive should spin up when needed automatically.


spinning down and up again is not very helpful for the life-time expectation :)
Debian 9.9 on Compulab Fitlet2
User avatar
fred44nl
 
Posts: 162
Joined: 2018-07-14 08:54

Re: How to prevent external HD to spin down

Postby bw123 » 2019-02-06 13:07

https://duckduckgo.com/html/?q=apm+Toshiba+Canvio

first hit...
http://www.technomatters.net/2014/10/to ... ction.html

fred44nl wrote:spinning down and up again is not very helpful for the life-time expectation :)


That's not exactly true, spinning constantly generating heat isn't helpful either. Some drives do seem to degrade after a large number of spinup/down cycles (usually a huge number, takes yrs to cause a problem), but it is not a general fact that spinning down is worse than constantly spinning. It's an interesting topic, and you can run your drives the way you want.

https://www.backblaze.com/b2/hard-drive-test-data.html
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02


Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable