Bug 121872 - smartd FAIL on boot
smartd FAIL on boot
Status: CLOSED DEFERRED
Product: Fedora
Classification: Fedora
Component: kernel-utils (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-28 15:51 EDT by Bob Gustafson
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-01 02:05:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
extract of smartd lines from /var/log/messages around reboot time (3.64 KB, text/plain)
2004-05-09 00:53 EDT, Bob Gustafson
no flags Details

  None (edit)
Description Bob Gustafson 2004-04-28 15:51:00 EDT
Description of problem:

 Seems to cough on ATA (but I have SCSI disks)

Version-Release number of selected component (if applicable):

 smartd version 5.21

How reproducible:
 Always

Steps to Reproduce:
1.Boot
2.
3.
  
Actual results:

Apr 28 13:49:46 hoho2 smartd[1504]: smartd version 5.21 Copyright (C)
2002-3 Bruce Allen
Apr 28 13:49:46 hoho2 smartd[1504]: Home page is
http://smartmontools.sourceforge.net/
Apr 28 13:49:46 hoho2 smartd[1504]: Opened configuration file
/etc/smartd.conf
Apr 28 13:49:46 hoho2 smartd[1504]: Configuration file
/etc/smartd.conf parsed.
Apr 28 13:49:46 hoho2 smartd[1504]: Device: /dev/hda, opened
Apr 28 13:49:46 hoho2 smartd[1504]: Device: /dev/hda, unable to read
Device Identity Structure
Apr 28 13:49:46 hoho2 smartd[1504]: Unable to register ATA device
/dev/hda at line 30 of file /etc/smartd.conf
Apr 28 13:49:46 hoho2 smartd[1504]: Unable to register device /dev/hda
(no Directive -d removable). Exiting.
Apr 28 13:49:46 hoho2 smartd: smartd startup failed
A
Expected results:

quietly work. And by sophisticated analysis, inform me a few days
before one of my disks fails.

Additional info:

smartd is not one of the 'components' in the FC list. Hope this does
not create a problem. Thanks for the text box to put in the smartd
name. (Oh well - MUST be listed component..)

I have two SCSI disks on U320 interface (scsibus0). Also toshiba cdrom
burner on separate (scsibus2) bus.
Comment 1 Bob Gustafson 2004-04-28 16:18:04 EDT
I went to the sourceforge web site, downloaded the latest version of
the smartmontools and installed it. See below.

Will now reboot to see if it works.

---------------


[root@hoho2 user1]# rpm -i --force smartmontools-5.30-1.i386.rpm
/etc/security/selinux/file_contexts: No such file or directory
warning: smartmontools-5.30-1.i386.rpm: V3 DSA signature: NOKEY, key
ID 9bb19a22Shutting down smartd: [FAILED]
Starting smartd: [  OK  ]
Restarted smartd services
smartd will continue to start up on system boot
[root@hoho2 user1]#
Comment 2 Bob Gustafson 2004-04-28 16:45:49 EDT
seems to work. No FAILED message on boot, but smartd is pretty verbose
- I guess I need to manually edit smartd.conf so that it does not try
all of the devices in the world on each boot.

scsi disk 0 currently at 31 degrees celcius
scsi disk 1 currently at 29 degrees celcius (better airflow?)
Comment 3 Bruce Allen 2004-04-29 02:15:04 EDT
Bob, please see the FAQ on the smartmontools web page, where it says:

# My Fedora Core Linux system displays the startup message: smartd
[FAILED]

Fedora Core is distributed with a smartd configuration file
/etc/smartd.conf that monitors the first IDE disk /dev/hda. If this
device does not exist (or lacks SMART capability) you will get the
error message above. Look in SYSLOG (/var/log/messages) for additional
details about what is going wrong.

The solution: If your system has only SCSI disks, or has IDE disk(s)
on a non-primary controller, just edit /etc/smartd.conf to reflect the
correct location of the drive(s). Please also read the 'smartd.conf'
man page for additional information.
Comment 4 Bob Gustafson 2004-04-29 09:00:28 EDT
Bruce - thanks much for your comments.

On the virgin test3, it seemed as though smartd was dead after the boot.

When I installed the latest smartmontools rpm, smartd worked after the
boot.

--

I have just now edited the /etc/smartd.conf file and hopefully it will
still work the next time I boot.
Comment 5 Bruce Allen 2004-04-29 15:02:52 EDT
Bob, you said:

> On the virgin test3, it seemed as though smartd was dead after the
> boot.

> When I installed the latest smartmontools rpm, smartd worked after the
> boot.

This is because the Fedora RPM has /etc/smartd.conf set up to monitor
/dev/hda.  Your /dev/hda device is probably a CDROM and can't be
monitored.

The Smartmontools RPM has /etc/smartd.conf set up to scan
for ATA and/or SCSI devices to monitor.

Arjan has done it both ways: having /etc/smartd.conf monitoring
/dev/hda by default is a perfectly sensible choice: it just doesn't
work for you since you use SCSI disks for the OS.

Cheers,
   Bruce
Comment 6 Harald Hoyer 2004-05-05 08:36:12 EDT
$ rpm -qf /usr/sbin/smartd
kernel-utils-2.4-9.1.130

reassigned to the component and component owner
Comment 7 Bob Gustafson 2004-05-08 05:25:33 EDT
To fix my problem, I had found and installed the package shown below
(version 5.30). See previous comments.

[user1@hoho2 user1]$ rpm -q -l -p smartmontools-5.30-1.i386.rpm | more
warning: smartmontools-5.30-1.i386.rpm: V3 DSA signature: NOKEY, key
ID 9bb19a22/etc/rc.d/init.d/smartd
/etc/smartd.conf
..

Yesterday (or was it the day before), I did a 'yum update \*' and now
have an uptodate system.

When I rebooted, I found that my edited /etc/smartd.conf was
overwritten, the newer /usr/sbin/smartd was over written (all with
older version 5.21), and on reboot, I now have a dead smartd (same
problem as originally noted)

[user1@hoho2 user1]$ /usr/sbin/smartd --version | more
smartd version 5.21 Copyright (C) 2002-3 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
..

[user1@hoho2 user1]$ /etc/rc.d/init.d/smartd status
smartd is stopped
[user1@hoho2 user1]$

I can reload the smartmontools 5.30 and edit the /etc/smartd.conf file
so that it will run,

I thought that the idea behind the 'yum update' command was that I
would have the latest version of available components and that they
would run on my system.  I guess this is wishful thinking on my part.
Comment 8 Bob Gustafson 2004-05-09 00:53:20 EDT
Created attachment 100110 [details]
extract of smartd lines from /var/log/messages around reboot time
Comment 9 Bob Gustafson 2004-05-09 00:54:35 EDT
With the new batch of updates (incl kernel 356), smartd still does not
run after boot.

It appears to be a syntax error in the /etc/smartd.conf file in line
41 (see attached log file extract).

The line in question has a '-s' option which is not recognized and is
not in the 'man smartd' pages (I didn't see it anyway).

39 -> # First two SCSI disks.  This will monitor everything that 
            smartd can
40 -> # monitor.  Do extended self-tests Wednesdays at 6pm and Sundays 
            at 1 am
41 -> /dev/sda -d scsi -s L/../../3/18
42 -> /dev/sdb -d scsi -s L/../../7/01
Comment 10 Bob Gustafson 2004-05-09 02:46:29 EDT
OK, I think I know what is happening.

1) I had once upon a time, installed smartmontools-5.31

2) The /etc/smartd.conf file in v 5.31 contains the lines with the
'-s' options.  (version 5.21 does not know about the '-s' lines)

3) When I did the update tonight (or the prevous one), the executable
/usr/sbin/smartd (version 5.21) overwrote the previous executable
(version 5.31)

4) However, either rpm or yum did NOT overwrite the /etc/smartd.conf,
even though that file is in the kernel-utils package.

To test this hypothesis, I renamed the /etc/smartd.conf to
/etc/smartdx.conf and did a force install of the kernel-utils package.

This process is shown below:

  [root@hoho2 user1]# cd /etc/
  [root@hoho2 etc]# mv smartd.conf smartdx.conf
  [root@hoho2 etc]# cd /home/user1
  [root@hoho2 user1]#
 
  [root@hoho2 user1]# rpm -i 
/var/cache/yum/development/packages/kernel-utils-2.4-9.1.131.i386.rpm
        package kernel-utils-2.4-9.1.131 is already installed
 
 [root@hoho2 user1]# rpm -i --force
/var/cache/yum/development/packages/kernel-utils-2.4-9.1.131.i386.rpm
  [root@hoho2 user1]#

Check to see whether /etc/smartd.conf was reloaded.
 
  [root@hoho2 user1]# ls -l /etc/smar*
  -rw-r--r--  1 root root 3036 May  7 02:40 /etc/smartd.conf
  -rw-r--r--  1 root root 3908 Apr 29 07:51 /etc/smartdx.conf
  [root@hoho2 user1]#

Yes, it was. Now reboot and extract the smartd lines from the log
 
  [root@hoho2 user1]# tail -600 /var/log/messages > log_mess2.out
  [root@hoho2 user1]# grep smartd log_mess2.out
  May  9 01:14:06 hoho2 smartd: smartd shutdown failed
  May  9 01:16:39 hoho2 smartd[2079]: smartd version 5.21 Copyright 
  (C) 2002-3 Bruce Allen
  May  9 01:16:39 hoho2 smartd[2079]: Home page is 
  http://smartmontools.sourceforge.net/
  May  9 01:16:39 hoho2 smartd[2079]: Opened configuration file 
  /etc/smartd.conf
  May  9 01:16:39 hoho2 smartd[2079]: Configuration file 
  /etc/smartd.conf parsed.
  May  9 01:16:39 hoho2 smartd[2079]: Device: /dev/hda, opened
  May  9 01:16:39 hoho2 smartd[2079]: Device: /dev/hda, unable to read 
  Device Identity Structure
  May  9 01:16:39 hoho2 smartd[2079]: Unable to register ATA device 
  /dev/hda at line 30 of file /etc/smartd.conf
  May  9 01:16:39 hoho2 smartd[2079]: Unable to register device 
  /dev/hda (no Directive -d removable). Exiting.
  May  9 01:16:39 hoho2 smartd: smartd startup failed
  [root@hoho2 user1]#

OK, now we are back at the original square 1. The 'as distributed'
/etc/smartd.conf will not start up the smartd monitor for my SCSI disks.

However, the newer smartmontools-5.31 WILL boot up successfully my
system with an unmodified 'as distributed' /etc/smartd.conf file.

The remaining question is:

  If you were to replace the old 5.21 smartmonutils with the new
version 5.31 smartmontools, would the yum/rpm update process replace
the (arguably out-of-date) /etc/smartd.conf since one does exist?

How does yum decide whether to replace or not replace a conf file?
Comment 11 Bruce Allen 2004-05-09 07:56:30 EDT
Hi Bob,

You wrote:

"OK, now we are back at the original square 1. The 'as distributed'
 /etc/smartd.conf will not start up the smartd monitor for my SCSI  
 disks. However, the newer smartmontools-5.31 WILL boot up 
 successfully my system with an unmodified 'as distributed'
 /etc/smartd.conf file."

In fact the original (unmodified by Fedora distributors)
smartmontools-5.21 would also have worked OK with an unmodified
smartd.conf file.  This is because it, and the -31 version, use
the DEVICESCAN directive to find all devices, including in your case
the SCSI devices.  The Fedora version is set up to only monitor
/dev/hda, which on your system is either a CD device or doesn't exist.

The question about Yum is one that I can't answer -- the Fedora
distributors will have to address this.

Bruce
Comment 12 Bob Gustafson 2004-05-25 01:26:53 EDT
FC2 distribution still contains version 5.21 which contains broken
(for me anyway) smartd.conf as pointed out by Bruce Allen (last
contributor to this bug report).

I did a clean install of FC2 and smartd does not work.

When I downloaded and installed the latest available smartmontools,
which is version 5.31, it works fine on my system.

----

What is involved in getting the latest version of smartmontools into
the FC distribution ????
Comment 13 Bob Gustafson 2004-06-01 02:05:29 EDT
I have upgraded to version 5.31 and no longer am monitoring this
problem...

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