Bug 110747 - smartd startup fails
smartd startup fails
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: smartmontools (Show other bugs)
5
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
:
: 126583 136022 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 08:49 EST by David Balažic
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version: 5.33-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-16 06:27:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Balažic 2003-11-24 08:49:43 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1)
Gecko/20031008

Description of problem:
On boot, the smartd startup step fails.

logs :

Nov 23 19:10:50 localhost smartd[5430]: smartd version 5.21 Copyright
(C) 2002-3 Bruce Allen
Nov 23 19:10:50 localhost smartd[5430]: Home page is
http://smartmontools.sourceforge.net/
Nov 23 19:10:50 localhost smartd[5430]: Opened configuration file
/etc/smartd.conf
Nov 23 19:10:50 localhost smartd[5430]: Configuration file
/etc/smartd.conf parsed.
Nov 23 19:10:50 localhost smartd[5430]: Device: /dev/hda, No such
device or address, open() failed
Nov 23 19:10:50 localhost smartd[5430]: Unable to register ATA device
/dev/hda at line 30 of file /etc/smartd.conf
Nov 23 19:10:50 localhost smartd[5430]: Unable to register device
/dev/hda (no Directive -d removable). Exiting.
Nov 23 19:10:50 localhost smartd: smartd startup failed


/etc/smartd.conf :

/dev/hda -H -m root@localhost.localdomain
# plus a lot of comments ...



Version-Release number of selected component (if applicable):
kernel-utils-2.4-9.1.101.fedora

How reproducible:
Always

Steps to Reproduce:
1. boot FC1

Actual Results:  smartd subsystem startup fails ( red [FAIL] string is
printed on screen )

Expected Results:  no failure

Additional info:

my storage devices :

hde,hdg - ATA hard drives
hda,hdb,hdb - ATAPI CD ROM units ( hda is CD-RW writer )
Comment 1 Bruce Allen 2003-11-26 01:18:58 EST
Hi David,

(1) The 'error message' from smartd is misleading.  In fact the
    reason /dev/hda is not monitored is that CD-ROM devices do
    not provide SMART data.

(2) You should list only the two ATA hard drives /dev/hde and /dev/hdg
    in /etc/smartd.conf .

(3) I suggest that you add (at least) 
    -l selftest -l error -o on -S on
    to the set of Directives

(4) The latest smartmontools release (5.25, see 
    http://sourceforge.net/project/showfiles.php?group_id=64297
    should give clearer error messages for CD-ROM (packet) devices.
    This addresses item (1) above.  If you could test this and
    verify that the error messages are clearer, that would be nice.
   
Comment 2 David Balažic 2003-11-26 04:38:45 EST
I think we're not thinking in the same direction.
The bug IMO is, that smartd is installed with a wrong config file.

Think about it :
- a fresh, normal install of Fedora Core 1
- one service always fails during startup

It is the same as if the wrong driver for the sound card would be
installed. Of course the user can fix it by editing some config files,
but there is still a bug that should be fixed.
Comment 3 Bruce Allen 2003-11-26 19:06:08 EST
OK, I see your point.

This is a choice made by the Fedora maintainers.  Since
the majority of Fedora linux systems have /dev/hda as a system
disk, this is what's monitored by default.
Comment 4 Tacitus 2003-12-03 02:07:48 EST
For what it's worth, I also have this problem from a fresh install of
FC1.  In my case, my hda is a CDROM because I don't have any other
PATA devices.  My hard drive is a SATA (Intel ICH5R controller) and
gets /dev/sda.

It's not a serious issue, but I'd agree it's a cosmetic bug in the
default install, and I think the SATA case is worth considering.
Comment 5 Bruce Allen 2003-12-03 10:33:48 EST
I'd be grateful to know if the 5.26 release at least gives more
understandable/graceful error messages that the 5.21 in Fedora.

My understanding is that (at least for now) SATA devices that use
the drivers/ide drivers can be monitored with smartmontools at /dev/hd?
paths.  But SATA devices that use libata and have /dev/sd? paths
can't be monitored by smartmontools, because libata lacks the needed
ATA pass-through commands.  When these are added to libata we'll add
another device type ('-d sata') to smartmontools to handle it.
Comment 6 David Balažic 2004-06-09 03:25:22 EDT
Same on FC2 , a red FAIL next to "Starting up smartd" during boot.
Comment 7 David Balažic 2004-06-09 03:26:52 EDT
Either fix it to not monitor hda by default ( a one byte change ) or
make it match reality.
Comment 8 Julius Thyssen 2004-07-03 22:52:28 EDT
After changing the smartd cfg to check
/dev/sda and /dev/sdb instead, since hda is also a CDROM in my case,
it gave me this:

Jul  4 04:35:33 jult smartd[1960]: smartd version 5.21 Copyright (C) 
2002-3 Bruce Allen 
Jul  4 04:35:33 jult smartd[1960]: Home page is 
http://smartmontools.sourceforge.net/  
Jul  4 04:35:33 jult smartd[1960]: Opened configuration 
file /etc/smartd.conf 
Jul  4 04:35:33 jult smartd[1960]: Configuration 
file /etc/smartd.conf parsed. 
Jul  4 04:35:33 jult smartd[1960]: Device: /dev/sda, opened 
Jul  4 04:35:33 jult smartd[1960]: Device: /dev/sda, Fetch of IEC 
(SMART) mode page failed, err=3, skip device 
Jul  4 04:35:33 jult smartd[1960]: Unable to register SCSI 
device /dev/sda at line 22 of file /etc/smartd.conf 
Jul  4 04:35:33 jult smartd[1960]: Unable to register device /dev/sda 
(no Directive -d removable). Exiting. 
Jul  4 04:35:33 jult smartd: smartd startup failed

which is strange (seems impossible) since both SATA drives have SMART 
enabled and working in BIOS.
Comment 9 Julius Thyssen 2004-07-03 23:17:15 EDT
After changing the smartd cfg to check
/dev/sda and /dev/sdb instead, since hda is also a CDROM in my case,
it gave me this:

Jul  4 04:35:33 jult smartd[1960]: smartd version 5.21 Copyright (C) 
2002-3 Bruce Allen 
Jul  4 04:35:33 jult smartd[1960]: Home page is 
http://smartmontools.sourceforge.net/  
Jul  4 04:35:33 jult smartd[1960]: Opened configuration 
file /etc/smartd.conf 
Jul  4 04:35:33 jult smartd[1960]: Configuration 
file /etc/smartd.conf parsed. 
Jul  4 04:35:33 jult smartd[1960]: Device: /dev/sda, opened 
Jul  4 04:35:33 jult smartd[1960]: Device: /dev/sda, Fetch of IEC 
(SMART) mode page failed, err=3, skip device 
Jul  4 04:35:33 jult smartd[1960]: Unable to register SCSI 
device /dev/sda at line 22 of file /etc/smartd.conf 
Jul  4 04:35:33 jult smartd[1960]: Unable to register device /dev/sda 
(no Directive -d removable). Exiting. 
Jul  4 04:35:33 jult smartd: smartd startup failed

which is strange (seems impossible) since both SATA drives have SMART 
enabled and working in BIOS.
Comment 10 Bruce Allen 2004-07-04 15:25:31 EDT
Julius,

Please see the smartmontools FAQ at
http://smartmontools.sourceforge.net/ and in particular the section
about SATA.  It says:

FireWire, USB, and SATA disks/systems

As for USB and FireWire (ieee1394) disks and tape drives, the news is
not good. They appear to Linux as SCSI devices but their
implementations do not usually support those SCSI commands needed by
smartmontools. The ieee1394 consortium recently certified the first
external enclosure (containing a ATA disk and a protocol bridge) as
being compliant to the relevant standards. Such devices have already
been on the market for about 3 years and they tend to only support the
bare minimum of commands needed for device operation (i.e. SMART
support is an unsupported extra).

Smartmontools should work correctly with SATA drives under both Linux
2.4 and 2.6 kernels, if you use the standard IDE drivers in
drivers/ide. If you use the new libata drivers, it won't work
correctly because libata doesn't yet support the needed
ATA-passthrough ioctl() calls. Jeff Garzik, the libata developer, says
that this support will be added to libata in the future. When this
happens, we'll add support to smartmontools for a new SATA/libata
device type '-d sata'. Typically, to force an SATA disk to run using
the standard (non-libata) drivers, you must use the BIOS to select
"legacy mode" for the controller. If the IDE driver doesn't support
your particular SATA controller, or the controller doesn't have a
legacy interface, then only libata can be used. Unless the hard disk
controller on the system motherboard is Intel, VIA or nVidia, standard
IDE drivers may not work 
Comment 11 Julius Thyssen 2004-07-06 08:39:09 EDT
I've already discovered this 'the hard way', since the recent AMI 
BIOSes and controllers on P4P800* ASUS boards are not working with 
defaults during FC1/FC2 install (which would imply use of libata).
If you are using SATA disks to boot from, and have no IDE HD's 
present, the only way to have them work with FC seems to be what 
ASUS/AMI call "Compatibility Mode", and have BIOS put on ignoring P-
ATA at boot (which seem not to be really stable yet with ASUS boards).

At first I'd expected Fedora to be a 'native O.S.', like Win XP, 
which would make it fall under "Enhanced Mode" supported drivers for 
the SATA disks, but apparently this is not the case.

Overall I think there needs to be some more interactivity with ASUS,
to have them support Fedora install more fluently, so I emailed them 
about it. Hope they understand what I mean (their BIOS and Manuals 
aren't really linux-ready).
Comment 12 Ben Smith 2004-09-25 11:33:24 EDT
This bug is still present in fc3t1, which is sad because there's two
easy solutions:  disable smartd by default or enable automatic device
detection.
Comment 13 David Balažic 2004-11-03 09:34:14 EST
the smartd.conf man page says :

DEVICESCAN - scan for devices to monitor

it will monitor the devices you have, it will not monitor devices you
dont have. Sounds like an ideal default setup.
Comment 14 Dave Jones 2005-01-14 00:19:59 EST
*** Bug 126583 has been marked as a duplicate of this bug. ***
Comment 15 Dave Jones 2005-04-21 22:53:59 EDT
does this still occur with the latest errata packages in FC3 ?
Comment 16 David Balažic 2005-04-26 03:57:07 EDT
I don't know, but I tried the version in Fedora Core 4 test 2 and it does not
give a FAILure at boot.
It is version smartmontools-5.33-1.5
Comment 17 Tomas Mraz 2005-11-16 06:27:34 EST
The removable devices should not be added to smartd.conf now.
Comment 18 Tomas Mraz 2005-11-16 06:55:26 EST
*** Bug 136022 has been marked as a duplicate of this bug. ***
Comment 19 Orion Poplawski 2006-03-22 18:29:50 EST
This is back with a fresh install of FC5 (smartmontools-5.33-4.2), or perhaps a
new variation with CD burners:

# A very silent check.  Only report SMART health status if it fails
# But send an email in this case
/dev/hda -H -m root
/dev/hde -H -m root

Mar 22 11:43:04 cynosure smartd[2273]: smartd version 5.33
[i386-redhat-linux-gnu] Copyright (C) 2002-4 Bruce Allen
Mar 22 11:43:04 cynosure smartd[2273]: Home page is
http://smartmontools.sourceforge.net/
Mar 22 11:43:04 cynosure smartd[2273]: Opened configuration file /etc/smartd.conf
Mar 22 11:43:04 cynosure smartd[2273]: Configuration file /etc/smartd.conf parsed.
Mar 22 11:43:04 cynosure smartd[2273]: Device: /dev/hda, opened
Mar 22 11:43:05 cynosure smartd[2273]: Device: /dev/hda, found in smartd database.
Mar 22 11:43:05 cynosure smartd[2273]: Device: /dev/hda, is SMART capable.
Adding to "monitor" list.
Mar 22 11:43:05 cynosure smartd[2273]: Device: /dev/hde, opened
Mar 22 11:43:05 cynosure smartd[2273]: Device: /dev/hde, packet devices [this
device Write-once (optical disk)] not SMART capable
Mar 22 11:43:05 cynosure smartd[2273]: Unable to register ATA device /dev/hde at
line 31 of file /etc/smartd.conf
Mar 22 11:43:05 cynosure smartd[2273]: Unable to register device /dev/hde (no
Directive -d removable). Exiting.

hde is my CDRW drive.
Comment 20 Tomas Mraz 2006-03-22 18:52:31 EST
What prints "cat /sys/block/hde/removable" ?

What controller is this device attached to?
Comment 21 Orion Poplawski 2006-03-22 18:58:43 EST
# cat /sys/block/hde/removable
0

Whoops, my bad, hde is my 16MB ATA pcmcia flash drive, not my CDRW.  It is
*definitely* removable.
Comment 22 Tomas Mraz 2006-03-23 02:46:29 EST
Hmm yes, but not from the kernel point of view. The smartd-conf.py configuration
script in current rawhide package is now modified so it tests every drive for
SMART support and so it should work fine with your configuration.
Comment 23 Orion Poplawski 2006-03-24 11:54:13 EST
Looks like forgotten quotes in /etc/sysconfig/smartmontools:

# command line options for smartd
smartd_opts=-q never

should be:

smartd_opts="-q never" 

I get:

# service smartd restart
/etc/sysconfig/smartmontools: line 2: never: command not found
/etc/sysconfig/smartmontools: line 2: never: command not found
Shutting down smartd:                                      [  OK  ]
/etc/sysconfig/smartmontools: line 2: never: command not found
Starting smartd:                                           [  OK  ]

But the new smartd.conf looks good:

# A very silent check.  Only report SMART health status if it fails
# But send an email in this case
/dev/hda -H -m root
# smartctl -i returns error for this drive
# /dev/hde -H -m root
Comment 24 Tomas Mraz 2006-03-24 12:39:56 EST
Sorry, my fault. I will build a new smartmontools soon.

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