Harddisk spindown
Version fra 12. dec 2013, 17:59 af Frank D (diskussion | bidrag) Frank D (diskussion | bidrag) (Tag changed from code to pre)
Opsætning af diske
Få en liste med disk UUID's
sudo blkid
Disable intern APM (f. eks. WD Green diske).
Hvor a erstattes med det aktuelle device.
sudo hdparm -B 255 /dev/sda
Manuel spindown
sudo hdparm -y /dev/sda
Redigér /etc/hdparm.conf og tilføj
sudo nano /etc/hdparm.conf
/dev/sda { apm = 255 poweron_standby = off keep_features_over_reset = on}
Spindown installering
Først installeres build essentials
sudo apt-get install make g++ build-essential
Spindown hentes og installeres.
wget http://spindown.googlecode.com/files/spindown-0.4.0.tar.gztar xvzf spindown-0.4.0.tar.gzcd spindown-0.4.0/makesudo make install
Kopiér eksempel configuration til etc biblioteket.
sudo cp spindown.conf.example /etc/spindown.conf
Få en liste over disk ID's.
ls -l /dev/disk/by-id/
eksempel:
lrwxrwxrwx 1 root root 9 2012-02-12 16:34 ata-ST940210AS_5QX2B7LY -> ../../sda
Redigér /etc/spindown.conf og tilføj
sudo nano /etc/spindown.conf
[Disk 1]id = ata-ST940210AS_5QX2B7LYspindown = 1command = hdparm -y
Standard spindown tid er 1 time (3600 sek.). Denne ændres i /etc/spindown.conf i general sektionen.
idle-time = 3600 # The time in seconds a disk has to be idle before it is spundown. # Do not use a value that is to small (less than 3600) unless you # know what you are doing.
Spindown startes med
sudo service spindown start
Status
Status for diske.
sudo service spindown status
dette giver følgende output med information om hver disk, eksempel.
* spindown is runningname watched active idle-time spindown-timesda 1 1 3 600
Test om en disk er i standby.
sudo hdparm -C /dev/sda