Wie man unter Ubuntu seine SATA-Harddisks ueberwachen kann und E-Mails erhaelt, wenn eine HD ersetzt werden sollte:

  • Pakete installieren
$ sudo apt-get install smartmontools mailx

  • Smartmontools aktivieren ("#" entfernen)
$ sudo vi /etc/default/smartmontools
start_smartd=yes
  • Devicescan deaktivieren ("#" hinzufuegen) und jedes SATA-Device einzeln eintragen (zusaetzlich "-M test" fuer E-Mail-Test)
$ sudo vi /etc/smartd.conf

#DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner
/dev/sda -a -d sat -m me@example.com -M diminishing -M test
/dev/sdb -a -d sat -m me@example.com -M diminishing
/dev/sdc -a -d sat -m me@example.com -M diminishing
/dev/sdd -a -d sat -m me@example.com -M diminishing

  • Exim fuer E-Mail-Versand an externe Hosts aktivieren
$ sudo dpkg-reconfigure exim4-config
  • "Internet Site" auswaehlen
  • Smartmontools starten
$ sudo /etc/init.d/smartmontools start

Falls der Dienst nicht starten sollte, /var/log/daemon.log konsultieren. Bei Debian Etch muss man fuer SATA "-d ata" statt "-d sat" verwenden.

  • Testen, ob Mailversand erfolgreich
$ sudo tail /var/log/exim4/mainlog
  • Falls SoftRAID genutzt wird, sollten Fehlermeldungen von mdadm an die selbe Adresse versendet werden
$ sudo vi /etc/mdadm/mdadm.conf
#MAILADDR root
MAILADDR me@example.com
$ sudo /etc/init.d/mdadm restart


No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.
To leave a comment you must approve it via e-mail, which will be sent to your address after submission.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Submitted comments will be subject to moderation before being displayed.