11. smartd startup

From Www



On Ubuntu, the config file is /etc/smartd.conf

you probably do not need to edit anything in there unless if you something non-standard.  By default smartd is configed to look for any drives and monitor them.


But you do need to edit /etc/default/smartmontools

sudo vi /etc/default/smartmontools


Then start the smartd daemon

sudo /etc/init.d/smartmontools

smartd logs /var/log/syslog


Example log output, newfish log, multiple PATA ide disk (/dev/hda /dev/hdb /dev/hdc)

Jul 28 01:00:27 newfish smartd[16134]: smartd version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen
Jul 28 01:00:27 newfish smartd[16134]: Home page is http://smartmontools.sourceforge.net/
Jul 28 01:00:27 newfish smartd[16134]: Opened configuration file /etc/smartd.conf
Jul 28 01:00:27 newfish smartd[16134]: Configuration file /etc/smartd.conf parsed.
Jul 28 01:00:27 newfish smartd[16134]: Device: /dev/hda, Permission denied, open() failed
Jul 28 01:00:27 newfish smartd[16134]: Unable to register ATA device /dev/hda at line 31 of file /etc/smartd.conf
Jul 28 01:00:27 newfish smartd[16134]: Unable to register device /dev/hda (no Directive -d removable). Exiting.
Jul 28 01:01:25 newfish smartd[16151]: smartd version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen
Jul 28 01:01:25 newfish smartd[16151]: Home page is http://smartmontools.sourceforge.net/
Jul 28 01:01:25 newfish smartd[16151]: Opened configuration file /etc/smartd.conf
Jul 28 01:01:25 newfish smartd[16151]: Drive: DEVICESCAN, implied '-a' Directive on line 24 of file /etc/smartd.conf
Jul 28 01:01:25 newfish smartd[16151]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Jul 28 01:01:25 newfish smartd[16151]: Problem creating device name scan list
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hda, opened
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hda, not found in smartd database.
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hda, is SMART capable. Adding to "monitor" list.
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdb, opened
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdb, found in smartd database.
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdb, is SMART capable. Adding to "monitor" list.
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdd, opened
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdd, found in smartd database.
Jul 28 01:01:25 newfish smartd[16151]: Device: /dev/hdd, is SMART capable. Adding to "monitor" list.
Jul 28 01:01:25 newfish smartd[16151]: Monitoring 3 ATA and 0 SCSI devices
Jul 28 01:01:26 newfish smartd[16153]: smartd has fork()ed into background mode. New PID=16153.
Jul 28 01:01:26 newfish smartd[16153]: file /var/run/smartd.pid written containing PID 16153



Error example output.  This was on the newfish machine and the error was caused by lack of permssion to access the devices.  Which was caused by running the init script but a user other than root.

Jul 27 19:26:22 newfish smartd[16070]: smartd version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen

Jul 27 19:26:22 newfish smartd[16070]: Home page is http://smartmontools.sourceforge.net/

Jul 27 19:26:22 newfish smartd[16070]: Opened configuration file /etc/smartd.conf

Jul 27 19:26:22 newfish smartd[16070]: Drive: DEVICESCAN, implied '-a' Directive on line 24 of file /etc/smartd.conf

Jul 27 19:26:22 newfish smartd[16070]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices

Jul 27 19:26:22 newfish smartd[16070]: Problem creating device name scan list

Jul 27 19:26:22 newfish smartd[16070]: Unable to monitor any SMART enabled devices. Try debug (-d) option. Exiting...



Example log output from HP sever testserver

Jul 27 18:47:30 TestServer smartd[14782]: smartd version 5.34 [i686-pc-linux-gnu] Copyright (C) 2002-5 Bruce Allen
Jul 27 18:47:30 TestServer smartd[14782]: Home page is http://smartmontools.sourceforge.net/
Jul 27 18:47:30 TestServer smartd[14782]: Opened configuration file /etc/smartd.conf
Jul 27 18:47:30 TestServer smartd[14782]: Drive: DEVICESCAN, implied '-a' Directive on line 24 of file /etc/smartd.conf
Jul 27 18:47:30 TestServer smartd[14782]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Jul 27 18:47:30 TestServer smartd[14782]: Device: /dev/hdc, opened
Jul 27 18:47:30 TestServer smartd[14782]: Device: /dev/hdc, not ATA, no IDENTIFY DEVICE Structure
Jul 27 18:47:30 TestServer smartd[14782]: Unable to monitor any SMART enabled devices. Try debug (-d) option. Exiting...


The first output from the startd startup shows the daemon starting up with no errors, it scans for drives, creates a list of drives to monitor, then begins monitoring them.



The last example output shows the smartd failing to find any drives.  This is a know problem with this version of smartmontools.  There are issue monitoring sata drives.  We will modify the config file to to specificly monitor drives, with options to work with this drive.



Next Slide


Files (0)
 

Retrieved from "http://penguinsunbound.org/Past_Meetings/20070728_SMART/11._smartd_startup"

Accessed 1357 times.This page was last modified 06:25, 28 Jul 2007



Running DekiWiki-stable.