tatami @Wiki
ハードディスクのsleep
最終更新:
匿名ユーザー
-
view
ハードディスクに一定時間アクセスがなかった場合、standbyモードに移行させる。
hdparm の -Sオプションを使う。
hdparm の -Sオプションを使う。
# hdparm -S 60 /dev/hdc
で5分後にsleepするように設定できる。
hdparm
ドライブを停止するまでの時間を設定するオプション
-S Set the standby (spindown) timeout for the drive. This value is used by
the drive to determine how long to wait (with no disk activity) before
turning off the spindle motor to save power. Under such circumstances, the
drive may take as long as 30 seconds to respond to a subsequent disk
access, though most drives are much quicker. The encoding of the timeout
value is somewhat peculiar.
-S n で指定。
n= 0 : timeouts are disabled
n= 1-240 : 5n sec step = 5 sec - 20 min
n= 241-251 : (n-240)*30 min sterp = 30 min - 5.5 hour
n= 252 : 21 min
n= 253 : vender defined
n= 255 : 21 min 15 sec
HDドライブの状態を表示するhdparmのオプション
-C Check the current IDE power mode status, which will always be one of
unknown (drive does not support this command), active/idle (normal opera-
tion), standby (low power mode, drive has spun down), or sleeping (lowest
power mode, drive is completely shut down). The -S, -y, -Y, and -Z flags
can be used to manipulate the IDE power modes.
-g Display the drive geometry (cylinders, heads, sectors), the size (in sec-
tors) of the device, and the starting offset (in sectors) of the device
from the beginning of the drive.
-i Display the identification info that was obtained from the drive at boot
time, if available. This is a feature of modern IDE drives, and may not be
supported by older devices. The data returned may or may not be current,
depending on activity since booting the system. However, the current mul-
tiple sector mode count is always shown. For a more detailed interpreta-
tion of the identification info, refer to AT Attachment Interface for Disk
Drives (ANSI ASC X3T9.2 working draft, revision 4a, April 19/93).
-I Request identification info directly from the drive, which is displayed in
a new expanded format with considerably more detail than with the older -i
flag.
-v Display all settings, except -i (same as -acdgkmnru for IDE, -gr for SCSI
or -adgr for XT). This is also the default behaviour when no flags are
specified.
hdparmの起動時の設定
Sargeでは、init.d にhdparmが用意されていて、/etc/hdparm.conf で設定ができる。
/etc/hdparm.confに以下を追加した。
/etc/hdparm.confに以下を追加した。
/dev/hdc {
spindown_time = 60
}
参考サイト
- 玄箱/VINE化2/HDD関連/HDD静音化
- 少しでも動作を速くしたい
- hdparm関係 UltraDMAを使うには
- 「うるさい玄箱(くろばこ)をどうにかするですヨ」
- Linux Tips HDDのアクセスが妙に遅く感じるときは (@IT)
- Linux向けハードディスク監視/設定アプリケーションの紹介
- ハードディスクの電源を止める (tatami内)