Home arrow Journal arrow Monitor your hard drive errors in FreeBSD
Monitor your hard drive errors in FreeBSD PDF
Tuesday, 31 May 2011
You can do that easy with smartmontools:

  cd /usr/ports/sysutils/smartmontools
  make install clean

Check if hard drive support S.M.A.R.T.:

  smartctl -i /dev/ad0

Enable SMART on a hard drive:

  smartctl -s on /dev/ad0

Check if a hard drive is healthy:

  smartctl -H /dev/ad0

Test a hard drive:

  smartctl -t short /dev/ad0

If you want to run a long test use long instead of short.

Get a detalied report about ad0 hard drive:

  smartctl -a /dev/ad0

or (a simple report):

  smartctl -i /dev/ad0

or (list only attributes):

  smartctl -A /dev/ad0

There's also a daemon in the package called smartd. To configure it copy a sample config file from /usr/local/etc, edit /etc/rc.conf file adding smartd and then start the service:

  cp /usr/local/etc/smartd.conf.sample /usr/local/etc/smartd.conf

Edit /etc/rc.conf and add:


Then start the service:

  /usr/local/etc/rc.d/smartd start

You can then add a line in /etc/periodic.conf to add reports to daily status report sent by mail:

  daily_status_smart_devices="/dev/ad0 /dev/ad1"

Last Updated ( Sunday, 12 June 2011 )
< Prev   Next >

Other BSD Systems





Best BSD firewall?