Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

closed as too localized by Luis Mar 14 '13 at 17:04

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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. –  A Student at a University Aug 17 '10 at 3:20
    
+1 I've noticed this myself. –  Nathan Osman Aug 19 '10 at 16:17

2 Answers 2

sudo hdparm -B254 /dev/yourdisk

share|improve this answer
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? –  A Student at a University Aug 17 '10 at 3:00
    
You can add it to /etc/rc.local –  Dennis Kaarsemaker Aug 17 '10 at 15:36
    
That clearly doesn't help run it on suspend, etc. –  A Student at a University Aug 18 '10 at 12:47
    
Does it really need to be rerun on suspend? I thought it was just once per boot. –  lfaraone Aug 19 '10 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. –  A Student at a University Aug 23 '10 at 11:03

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.

share|improve this answer
    
Doesn't work on resume from suspend. –  A Student at a University Aug 18 '10 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). –  Javier Rivera Aug 18 '10 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. –  A Student at a University Aug 23 '10 at 11:02
1  
Have you tried to set it up in /etc/apm/resume.d? –  Javier Rivera Aug 23 '10 at 16:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.