hdparmcommand to determine what is the current enter sleep mode timer value (APM LEVEL):
# hdparm -B /dev/sda /dev/sda: APM_level = 254The possible values for AMP level are between 1 ... 254. Multiply APM value by 5 and you get number of seconds your hard drive enters standby mode. For the block device /dev/sda above we can see that it enters standby mode after 1270 seconds of idle time that is if we set APM_level value to 1 the hard drive enters sleep mode after 5 seconds. 5 seconds may seem as a lot of energy saving, however, it may come with the price of reduced hard drive's life span.
Each time hard drive enters sleep mode and resumes normal working mode the head and hard drive's wear more rapidly. To reduce APM LEVEL of our hard drive you can use the bellow hdparm command:
# hdparm -B100 /dev/sda /dev/sda: setting Advanced Power Management level to 0x64 (100) APM_level = 100Now the hard drive we sleep after 500 seconds of idle time.