Die Disk, Die

There's been a lot of "Ubuntu kills laptop hard drives" buzz going around lately. The implication is that over aggressive power management is causing excessive load/unload cycles, exceeding a reasonable duty cycle, and drastically shortening the life of your drive. I run Debian unstable on my laptop but I looked into it anyway and sure enough it's something which is effecting me as well.

As Matthew Garrett points out, it doesn't have anything to do with Ubuntu, Debian, or Linux in general, the culprit is aggressive power management settings in the drive firmware, or settings applied by the BIOS.

If this is happening to you, it's possible that it can be rectified with a firmware upgrade or by updating settings in the BIOS. The solution I chose was to allow laptop-mode-tools to control power management, applying maximum power savings when on battery (hdparm -B 1 /dev/$device), and disabling it when on AC power (hdparm -B 254 /dev/$device).

If you have an otherwise default install of laptop-mode-tools on Debian you can accomplish this by setting CONTROL_HD_POWERMGMT=1 in /etc/laptop-mode/laptop-mode.conf and issuing an /etc/init.d/laptop-mode restart.

Duplicity backport for Etch

I've been backing up all of my important machines to Amazon S3 using Duplicity for sometime now. It's worked out really well but required just enough hackery to prevent me from providing straight forward instructions for others.

I'm all about sharing the love so I submitted a new S3 backend to upstream using the excellent [boto] (http://code.google.com/p/boto/) library from Mitch Garnaat, and I packaged boto for Debian. The new backend made it into the 0.4.3 release of Duplicity, which in turn migrated to testing a couple of weeks ago. Now there is an Etch backport of 0.4.3 on backports.org.

In addition to installing duplicity from backports.org you will also need to pin python-boto from Lenny.

Enjoy.