Bug 106184 - smartd is chatty
Summary: smartd is chatty
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-utils
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Dave Jones
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-03 15:05 UTC by Mark H Johnson
Modified: 2015-01-04 22:03 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-01-14 05:06:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark H Johnson 2003-10-03 15:05:46 UTC
Description of problem:

Almost a hundred lines of output in /var/log/messages during each boot.
Obviously, the config file is not correct for smartd. A quick review of
  /etc/smartd.conf
shows uncommented lines for devices that do not exist on my system, email to
"admin", and other undesired settings. Recommend replacing
DEVICESCAN and current contents with a generated file based on output from the
hardware detection software.

For reference, on my system, /dev/hda is my hard disk, /dev/hdd is the CD ROM.

Version-Release number of selected component (if applicable):
kernel-utils-2.4-8.31

How reproducible:
Boot your system 

Steps to Reproduce:
1. Boot your system
2. grep smartd /var/log/messages
3.
    
Actual results:
See below for sample.

Expected results:
A few lines showing the devices I have, not what I don't have. Should also
change if / when I add or replace hardware.

Additional info:
Oct  3 08:27:17 dws77 smartd[2448]: smartd version 5.1-11 Copyright (C) 2002-3
Bruce Allen
Oct  3 08:27:17 dws77 smartd[2448]: Home page is
http://smartmontools.sourceforge.net/
Oct  3 08:27:17 dws77 smartd[2448]: Using configuration file /etc/smartd.conf
Oct  3 08:27:17 dws77 smartd[2448]: Scan Directive DEVICESCAN found in
/etc/smartd.conf. Will scan for devices.
Oct  3 08:27:17 dws77 smartd[2448]: Drive: DEVICESCAN, implied '-a' Directive on
line 19 of file /etc/smartd.conf
Oct  3 08:27:17 dws77 smartd[2448]: smartd: Scanning for devices.
Oct  3 08:27:17 dws77 smartd[2448]: Device: /dev/hda, opened
Oct  3 08:27:17 dws77 smartd[2448]: Device: /dev/hda, not found in smartd
database.
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hda, is SMART capable. Adding
to "monitor" list.
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdb, opened
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdb, unable to read Device
Identity Structure
Oct  3 08:27:18 dws77 smartd[2448]: Unable to register ATA device /dev/hdb at
line 19 of file /etc/smartd.conf
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdc, opened
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdc, unable to read Device
Identity Structure
Oct  3 08:27:18 dws77 smartd[2448]: Unable to register ATA device /dev/hdc at
line 19 of file /etc/smartd.conf
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdd, opened
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdd, not found in smartd
database.
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hdd, appears to lack SMART, use
'-T permissive' Directive to try anyway.
Oct  3 08:27:18 dws77 smartd[2448]: Unable to register ATA device /dev/hdd at
line 19 of file /etc/smartd.conf
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/hde, No such device or address,
open() failed
Oct  3 08:27:18 dws77 smartd[2448]: Unable to register ATA device /dev/hde at
line 19 of file /etc/smartd.conf
... repeats until /dev/hdl and /dev/sda through /dev/sdz
Oct  3 08:27:18 dws77 smartd[2448]: Device: /dev/sdz, No such device or address,
open() failed
Oct  3 08:27:18 dws77 smartd[2448]: Unable to register SCSI device /dev/sdz at
line 19 of file /etc/smartd.conf
Oct  3 08:27:18 dws77 smartd[2448]: Started monitoring 1 ATA and 0 SCSI devices
Oct  3 08:27:19 dws77 smartd: smartd startup succeeded

Comment 1 Bruce Allen 2003-10-05 05:18:26 UTC
Mark,

Obviously, for your system you'll want /etc/smartd.conf to look something
like:

# /etc/smartd.conf
/dev/hda -a -m mark_h_johnson

and since you obviously keep an eye on syslog, you might also want to add
-I 194
to the above, (assuming that your disk's temperature Attribute is #194).

Now to address the "real" point of your comments...

It would be sensible to (on Red Hat) parse /etc/sysconfig/hwconf
to identify disk devices.  A python script that did a competent job
of this could probably be done in minutes - and could be dropped right into
kickstart to create a custom /etc/smartd.conf.  I'd also be happy to include
such a script in the smartmontools package, if it existed.

Unfortunately each different distribution has their "own" way of creating
such a database, so this does need to be redone for each different distribution.
And unfortunately I don't know python.  Perhaps someone at Red Hat will take
this up.

Comment 2 Dave Jones 2005-01-14 05:06:25 UTC
we do have such a script these days, and hopefully it does the right thing.
I'm going to close this bug as its been around for over a year without comment.

Please reopen if the current release doesn't do what you think it should.


Note You need to log in before you can comment on or make changes to this bug.