2

How does one prevent the power-save load-cycling of a laptop hard drive in 10.04 in desktop and laptop machines? These desktop and laptop machines with laptop hard drives have thousands of load cycles, already according to smartctl, and we don't want them to die of kerchunking.

Laptop-mode-tools is, or was, somehow involved. The files have moved around and been refactored a good bit since I fixed this on 9.04, and I can't seem to find the setting now.

1
  • 1
    It seems that there is no way to get Ubuntu to hold off disk accesses for hours in a way that makes it possible to sleep laptop drives in an always-on machine without causing spin-up almost immediately after spin-down, eventually killing the drive. Aug 17, 2010 at 3:20

2 Answers 2

1

sudo hdparm -B254 /dev/yourdisk

5
  • 1
    That only fixes it temporarily. How does one change a configuration file somewhere that will not be automatically replaced to accomplish this on every suspend/resume, boot, hibernate, power change, etc? Aug 17, 2010 at 3:00
  • You can add it to /etc/rc.local Aug 17, 2010 at 15:36
  • That clearly doesn't help run it on suspend, etc. Aug 18, 2010 at 12:47
  • Does it really need to be rerun on suspend? I thought it was just once per boot.
    – lfaraone
    Aug 19, 2010 at 15:06
  • This setting configures the hard drive. The hard drive is turned off on suspend. This loses the setting. It has to be resent. Aug 23, 2010 at 11:03
0

AFAIK you must be able to set it in /etc/hdparm.conf . If it doesn't work you can always add nohdparm to your boot line on grub.

Note that /etc/apm/event.d/20-hdparm will change APMD_SPINDOWN, maybe upping it value there can be a more conservative approach.

4
  • Doesn't work on resume from suspend. Aug 18, 2010 at 12:47
  • I don't really understand how suspend works on linux, so I'm not going to be helpful. But, out of curiosity, what didn't work after resume: hdparm.conf, nohdparm or both. I expect nohdparm to work because I suspect that the same kernel is still in memory after resume (as I said, I can be very wrong as I don't really now how it works) from suspend (as opposed to hibernate). Aug 18, 2010 at 14:23
  • This setting configures the hard drive. The hard drive is turned off on suspend. This loses the setting. It has to be resent. Aug 23, 2010 at 11:02
  • 1
    Have you tried to set it up in /etc/apm/resume.d? Aug 23, 2010 at 16:15

Not the answer you're looking for? Browse other questions tagged .