Welcome! Log In Create A New Profile

Advanced

Debian - Hard Drive Idle Tool

Posted by stormlight 
Debian - Hard Drive Idle Tool
December 20, 2015 12:10AM
Is there an hard idle tool? Archlinux has hd-idle package. OpenWRT has sd-idle. Is there one for Debian Arm? I performed 'apt-cache search idle' but do not any proper package. Online search has limited results.
Re: Debian - Hard Drive Idle Tool
December 20, 2015 12:32PM
stormlight,

I'm not aware of any Debian package for this purpose (I never look for it, there migh be one). But here is a simple script I run in /etc/rc.local to set spindown period for a specific drive.

If you have more than one drives, clone the code for each mountpoint. The mountpoint here is /media/HOME

cat spindown
#!/bin/sh  
#
#

logger "Set spindown period for all SATA HDD media drives"

if /bin/mountpoint /media/HOME -q ; then
   DEV=`mount | grep 'HOME ' | cut -c1-8`
   hdparm -S 240 $DEV
   logger -s -i "Set Spin down period to 20 minutes for HOME on " $DEV  
fi

exit 0

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 12/20/2015 12:33PM by bodhi.
Re: Debian - Hard Drive Idle Tool
January 03, 2016 10:49PM
Thank you Bhodi!

So I learned how to compile hd-idle from source. :-) Noob in action. I attached the pre-compile for Oxnas. I have not tested on Kirkwood.

cp hd-idle_1.05_armel.deb /tmp
cd /tmp

#install package
dpkg -i hd-idle_1.05_armel.deb

#enable/edit service configuration 
nano /etc/default/hd-idle
	change: START_HD_IDLE=false  To: START_HD_IDLE=True
	change: #HD_IDLE_OPTS="-i 180 -l /var/log/hd-idle.log"
	To: 	HD_IDLE_OPTS="-i 900 -l /tmp/hd-idle.log"                   #set 15min to sleep
#save and exit

/etc/init.d/hd-idle start

hd-idle_1.05_armel.deb md5: 3d2cd47463b1e41765d650d778cbd80d
source: http://sourceforge.net/projects/hd-idle/files/hd-idle-1.05.tgz/download
author website: http://hd-idle.sourceforge.net/



Edited 2 time(s). Last edit at 01/04/2016 04:22PM by stormlight.
Attachments:
open | download - hd-idle_1.05_armel.deb (14.4 KB)
open | download - source-hd-idle-1.05.tgz (17.5 KB)
Re: Debian - Hard Drive Idle Tool
January 04, 2016 12:41AM
Cool!

What we usually do with deb binary like this is:

- include a link to the source dode
- run a md5checksum.

Pls update your post with the info above so I can include this tool in the sticky tips thread.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian - Hard Drive Idle Tool
January 12, 2016 09:50AM
just as an alternative to this - i use hdparm from the repos.

apt-get install hdparm

https://en.wikipedia.org/wiki/Hdparm
Re: Debian - Hard Drive Idle Tool
January 14, 2016 04:36PM
Gravelrash,
The nice thing about hd-idle is that even if someone is login and in the directory of the harddrive (idle) or in the folder explorer, the hard drive can still go to sleep. HDparm will not put the drive to sleep if there is active session and no activity.
Re: Debian - Hard Drive Idle Tool
January 14, 2016 10:54PM
stormlight Wrote:
-------------------------------------------------------
> Gravelrash,
> The nice thing about hd-idle is that even if
> someone is login and in the directory of the
> harddrive (idle) or in the folder explorer, the
> hard drive can still go to sleep. HDparm will not
> put the drive to sleep if there is active session
> and no activity.

No, hdparm will put the drive to sleep just fine when there is active session (as long as the active session does not periodically write to the disk).

hdparm is very reliable in all aspects. As I mentioned above, you can put the script in /ect/rc.local and basically forget it is even there.
http://forum.doozan.com/read.php?2,24943,24944#msg-24944

To monitor disk activity to find the reason why a disk did not remain in the sleep state:
iotop -o -b -qqq

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 01/15/2016 02:24AM by bodhi.
Re: Debian - Hard Drive Idle Tool
June 05, 2016 01:16PM
Gravelrash Wrote:
-------------------------------------------------------
> just as an alternative to this - i use hdparm from
> the repos.
>
> apt-get install hdparm
>
> https://en.wikipedia.org/wiki/Hdparm

This is excellent, I can't wait to get HD auto mounting to use it. I've installed it and tested some of its features already, r/w speed, it's great and simple to use.
Thanks!
Re: Debian - Hard Drive Idle Tool
December 09, 2018 05:54AM
hd-idle pre-compiled for NAS326

First of all BIG thanks to bodhi and thanks to stormlight.

cp hd-idle_1.06_armhf.deb /tmp
cd /tmp

install package
dpkg -i hd-idle_1.06_armhf.deb

enable/edit service configuration
nano /etc/default/hd-idle

Quote

change: START_HD_IDLE=false To: START_HD_IDLE=True
change: #HD_IDLE_OPTS="-i 180 -l /var/log/hd-idle.log"
To: HD_IDLE_OPTS="-i 900 -l /tmp/hd-idle.log" #set 15min to sleep

save and exit

start hd-idle
/etc/init.d/hd-idle start


hd-idle_1.06_armhf.deb --- md5: 1118b86987407d57b0311204c667c1b8

source: https://sourceforge.net/projects/hd-idle/files/
author website: http://hd-idle.sourceforge.net/



Edited 2 time(s). Last edit at 12/09/2018 05:58AM by Hardy.
Attachments:
open | download - hd-idle_1.06_armhf.deb (13.9 KB)
Re: Debian - Hard Drive Idle Tool
December 09, 2018 06:15AM
For a Western Digital HDD, there is a idle3-tools. I wonder if this tool will work with other brand, i.e. a Seagate HDD.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: