--- harddrive.orig +++ harddrive.new @@ -23,7 +23,7 @@ $0: Control hard drive spindown, write caching, power management and acoustic management. -This hook has 8 tuneable parameters: +This hook has 6 tuneable parameters: DRIVE_SPINDOWN_VALUE_AC = time until a drive will spin down on AC Defaults to 0, which disables drive spindown. DRIVE_SPINDOWN_VALUE_BAT = time until a drive will spin down on battery @@ -45,14 +45,6 @@ See the -B option on the hdparm man page -Drive acoustic management: -DRIVE_ACOUSTIC_MGMT_AC = Drive Acoustic Management value on AC -Defaults to 254 for max head speed. -DRIVE_ACOUSTIC_MGMT_BAT = Drive Acoustic Management value on battery -Defaults to 128 for max quietness. - -See the -M option on the hdparm man page. - Drives to manage: DRIVE_LIST = the list of hard drives to manage. Defaults to "/dev/[hs]d[a-z]", which will manage up to the first 25 drives. @@ -62,8 +54,7 @@ harddrive_ac () { for dev in $DRIVE_LIST; do - # disable write caching, do not spin down the drive, disable APM - # and acoustic management, and sync everything to drive. + # enable write caching, do not spin down the drive, disable APM printf "Disabling hard drive power management for %s..." "$dev" hdparm -W $DRIVE_WRITE_CACHE_AC \ -S $DRIVE_SPINDOWN_VALUE_AC \ @@ -75,12 +66,12 @@ harddrive_battery() { for dev in $DRIVE_LIST; do - # disable write caching, enable acoustic management + # disable write caching, spin down the drive, enable APM + # and sync everything to drive. printf "Enabling power management for %s..." "$dev" hdparm -W $DRIVE_WRITE_CACHE_BAT \ -S $DRIVE_SPINDOWN_VALUE_BAT \ - -B $DRIVE_POWER_MGMT_BAT \ - -M $DRIVE_ACOUSTIC_MGMT_BAT -F $dev >/dev/null 2>&1 \ + -B $DRIVE_POWER_MGMT_BAT -f $dev >/dev/null 2>&1 \ && echo Done. || echo Failed. done }