Forskel mellem versioner af "Harddisk spindown"
Spring til navigation
Spring til søgning
Frank D (diskussion | bidrag) m (→Status: updated) |
Frank D (diskussion | bidrag) (Code examples fixed) |
||
Linje 30: | Linje 30: | ||
== Spindown installering == | == Spindown installering == | ||
+ | |||
Først installeres '' build essentials '' | Først installeres '' build essentials '' | ||
+ | <pre>sudo apt-get install make g++ build-essential</pre> | ||
− | + | Spindown hentes og installeres. | |
− | |||
− | |||
− | |||
− | |||
<pre> | <pre> | ||
wget https://spindown.googlecode.com/files/spindown-0.4.0.tar.gz | wget https://spindown.googlecode.com/files/spindown-0.4.0.tar.gz | ||
Linje 48: | Linje 46: | ||
Kopiér eksempel configuration til '' etc '' biblioteket. | Kopiér eksempel configuration til '' etc '' biblioteket. | ||
− | <pre> | + | <pre>sudo cp spindown.conf.example /etc/spindown.conf</pre> |
− | sudo cp spindown.conf.example /etc/spindown.conf | ||
− | </pre> | ||
− | |||
Få en liste over disk ID's. | Få en liste over disk ID's. | ||
− | <pre> | + | <pre>ls -l /dev/disk/by-id/</pre> |
− | ls -l /dev/disk/by-id/ | ||
− | </pre> | ||
eksempel: | eksempel: | ||
− | <pre> | + | <pre>lrwxrwxrwx 1 root root 9 2012-02-12 16:34 ata-ST940210AS_5QX2B7LY -> ../../sda</pre> |
− | lrwxrwxrwx 1 root root 9 2012-02-12 16:34 ata-ST940210AS_5QX2B7LY -> ../../sda | ||
− | </pre> | ||
+ | Redigér '' /etc/spindown.conf '' | ||
+ | <pre>sudo nano /etc/spindown.conf</pre> | ||
− | + | Og tilføj | |
− | |||
<pre> | <pre> | ||
− | + | [Disk 1] | |
+ | id = ata-ST940210AS_5QX2B7LY | ||
+ | spindown = 1 | ||
+ | command = hdparm -y | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
Standard spindown tid er 1 time (3600 sek.). Denne ændres i '' /etc/spindown.conf '' i general sektionen. | Standard spindown tid er 1 time (3600 sek.). Denne ændres i '' /etc/spindown.conf '' i general sektionen. | ||
<pre> | <pre> |
Versionen fra 23. feb 2015, 15:26
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 https://spindown.googlecode.com/files/spindown-0.4.0.tar.gz tar xvzf spindown-0.4.0.tar.gz cd spindown-0.4.0/ sudo make sudo 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
sudo nano /etc/spindown.conf
Og tilføj
[Disk 1] id = ata-ST940210AS_5QX2B7LY spindown = 1 command = 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 running name watched active idle-time spindown-time sda 1 1 3 600
Test om en disk er i standby.
sudo hdparm -C /dev/sda