Linux - Spindown (spin down idle disks)
Spindown is a daemon to spin down idle disks and thus save energy and give the disks a longer lifetime. It also works with USB disks and hot-swappable disks because it uses the device ID to identify the disk instead of the device name (such as hda or sdb). This means that it doesn't matter if the disk is swapped while the daemon is running.
Installation
$ tar xvzf spindown-x.x.x.tar.gz
$ cd spindown-x.x.x.tar.gz
$ make
# make install
# mv /etc/spindown.conf.example /etc/spindown.conf
Configuration
# ls -l /dev/disk/by-id/ #---- find out HDD id
# vi /etc/spindown.conf
[General]
cycle-time = 60
idle-time = 3600
[Disk 1]
name = hda
spindown = 1
[Disk 2]
name = sda
spindown = 1
command = --pc=2
#---- use command " sg_start --stop --pc=2 /dev/hda " to test the command parameter
Usage
# /etc/init.d/spindown start
# /etc/init.d/spindown status
# spindownd --help
Installation
$ tar xvzf spindown-x.x.x.tar.gz
$ cd spindown-x.x.x.tar.gz
$ make
# make install
# mv /etc/spindown.conf.example /etc/spindown.conf
Configuration
# ls -l /dev/disk/by-id/ #---- find out HDD id
# vi /etc/spindown.conf
[General]
cycle-time = 60
idle-time = 3600
[Disk 1]
name = hda
spindown = 1
[Disk 2]
name = sda
spindown = 1
command = --pc=2
#---- use command " sg_start --stop --pc=2 /dev/hda " to test the command parameter
Usage
# /etc/init.d/spindown start
# /etc/init.d/spindown status
# spindownd --help
Comments
Post a Comment