Bug 111666 - smartd refuses to run
Summary: smartd refuses to run
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-utils
Version: 1
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2003-12-08 13:13 UTC by Ted Kaczmarek
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2003-12-09 11:13:57 UTC

Attachments (Terms of Use)

Description Ted Kaczmarek 2003-12-08 13:13:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5)
Gecko/20031129 Epiphany/1.0.6

Description of problem:
Smartd does not start, from gdb exits with code 020.

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

How reproducible:

Steps to Reproduce:
1.service smartd start fails on boot
2.service smartd start fail manual

Actual Results:  (gdb) exec-file smartd
(gdb) run
Starting program: /usr/sbin/smartd
(no debugging symbols found)...Using host libthread_db library
(no debugging symbols found)...
Program exited with code 020.

Expected Results:  smartd runs

Additional info:

Dell Precision 330, has two FUJITSU  Model: MAJ3182MP 18 gig scsi
drives, setup as md0. Snippet from strace below.

rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
stat64("/etc/init.d/smartd", {st_mode=S_IFREG|0755, st_size=3115,
...}) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
stat64(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/sbin/env", 0xbff3eb00)         = -1 ENOENT (No such file or
stat64("/usr/sbin/env", 0xbff3eb00)     = -1 ENOENT (No such file or
stat64("/bin/env", {st_mode=S_IFREG|0755, st_size=13832, ...}) = 0
stat64("/bin/env", {st_mode=S_IFREG|0755, st_size=13832, ...}) = 0
rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
clone(Starting smartd: child_stack=0,
child_tidptr=0xbf51b0c8) = 21366
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGINT, {0x80749a0, [], SA_RESTORER, 0x4daa38},
{SIG_DFL}, 8) = 0
waitpid(-1,    [FAILED]

Comment 1 Bruce Allen 2003-12-08 22:40:44 UTC
Could you please post the output of:

/usr/sbin/smartd -d

Comment 2 Ted Kaczmarek 2003-12-08 23:30:00 UTC
[root@tarkus root]# smartd -d
smartd version 5.21 Copyright (C) 2002-3 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
Opened configuration file /etc/smartd.conf
Configuration file /etc/smartd.conf parsed.
Device: /dev/sda, opened
Device: /dev/sda, IE (SMART) not enabled, skip device
Unable to register SCSI device /dev/sda at line 34 of file
Unable to register device /dev/sda (no Directive -d removable). Exiting.

Comment 3 Ted Kaczmarek 2003-12-08 23:35:20 UTC
It doesn't like any entries on this machine.
I tried 
/dev/sda -d scsi
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/md0              16634932   7846800   7943120  50% /
/dev/sda1               147764      8653    131482   7% /boot
none                    386592         0    386592   0% /dev/shm

Works like a charm on another box I have that has 2 scsi and 2 ide
drives, but no raid on that box.

Comment 4 Bruce Allen 2003-12-09 07:10:23 UTC
This message:

Device: /dev/sda, IE (SMART) not enabled, skip device

means that you need to enable smart on the drive.  Use:
   smartctl -s on /dev/sda
to do that.

Comment 5 Ted Kaczmarek 2003-12-09 11:13:57 UTC
you the man :-) Wish their was a comment in the config file for that.
The man page makes it appear as if smartd itself will do that when
starting. I guess what threw me is my other scsi box I did not need to
do that command.

Comment 6 Bruce Allen 2003-12-09 11:24:48 UTC
The man page says:

       smartd will attempt to  enable  SMART  monitoring  on  ATA
       devices (equivalent to smartctl -s on) and polls these and
       SCSI devices  every  30  minutes  (configurable),  logging
       SMART  errors and changes of SMART Attributes via the SYS-
       LOG interface.

It may be possible to automatically enable SMART for SCSI
devices as well, or alternatively to improve the warning message so
that it says to use 'smartctl -s on' to enable SMART.  But at the
earliest this will be in the 5.27 release.

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