S.M.A.R.T. stuff

RAID setup is nice – it provides redundancy and makes you buy more hard disks (and drives the economy). But the advantages are somehow retrospective; it is only realized when a disk gives up and calls it a day and you suddenly feel so smart (no pun here) that you had a RAID setup. For us to take preemptive measures, we can use smartmontools to monitor the vitals of the disks. So we know when the disk is reaching the end of its life and plan ahead, like getting a replacement, migrate to another system, etc.

apt-get install smartmontools                          # or

apt-get install smartmontools --no-install-recommends  # to install w/o the recommended mail server

Under /etc/default/smartmontools, uncomment a line to have smartd start on system startup:


Configurations are found in /etc/smartd.conf. I chose to combine 2 examples to come up with the following:

DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner -R 194 -R 231 -I 9

It means to scan for all devices, monitor them using default settings, send an email to root on failures, show raw Temperature_Celsius readings in /var/log/syslog and ignore Power_On_Hours. Now I drive the economy before the disk fails on me 🙂

Manpage of SMARTD.CONF


Install unstable packages on lenny

I run lenny on my home server. That said, there are times when I want new packages which are not available on lenny backports. One solution is apt pinning (another is compile from source :p).

First, add the unstable repo entry in /etc/apt/source.list:

deb http://ftp.us.debian.org/debian unstable main

Then, add the following in /etc/apt/preferences:

Package: *
Pin: release a=unstable
Pin-Priority: 800

While this works generally, please refer to apt_preferences manpage for more details. Finally, run

apt-get update && apt-get install -t unstable <your-new-package>

to update and install the package from unstable. Depending on individual requirements, you may choose to substitute testing for unstable. Enjoy!

AptPinning – Debian Wiki