Comment 2 for bug 595138

Revision history for this message
Maxim Tikhonov (tikhonov) wrote :

As a temporary workaround for disk spindown I added the following to "/etc/rc.local".

# workaround for hdparm disk spindown in 10.04
(echo "\n$(date)" && for devname in $(cat /etc/hdparm.conf | grep -o "/dev/sd[a-z]"); do export DEVNAME="$devname" && (/lib/udev/hdparm || true); done) >> /var/log/hdparm_fix.log

This looks into "/etc/hdparm.conf", gets all "sd*" device names and then runs "/lib/udev/hdparm" script in the same way the "/lib/udev/rules.d/85-hdparm.rules" rule does. This helps to set the settings I have in "/etc/hdparm.conf" during boot. For new devices plugged into the system after boot, the standard rule should work just fine. In case if anybody uses it, check the "/var/log/hdparm_fix.log" after boot to make sure it set the settings you have in your config.