Bug 674629

Summary: smartd does not monitoring hard drives
Product: [Fedora] Fedora Reporter: Mikhail Kalenkov <mikhail.kalenkov>
Component: smartmontoolsAssignee: Michal Hlavinka <mhlavink>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 13CC: mhlavink
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-02-03 10:07:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Mikhail Kalenkov 2011-02-02 18:12:39 UTC
smartd does not monitoring hard drives

Description of problem: 

smartd is starting normal, but it does not write SMART data to /var/log/messages. At the same time I can check the disks with smartctl without any problems.

I have standard line in /etc/smartd.conf
DEVICESCAN -H -m root -n standby,10,q

After reboot smartd writes the following lines to /var/log/messages

================================================================
Feb  2 20:15:14 localhost smartd[1449]: smartd 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build)#012Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net#012
Feb  2 20:15:14 localhost smartd[1449]: Opened configuration file /etc/smartd.conf
Feb  2 20:15:14 localhost smartd[1449]: Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Feb  2 20:15:14 localhost smartd[1449]: Device: /dev/sda, type changed from 'scsi' to 'sat'
Feb  2 20:15:14 localhost smartd[1449]: Device: /dev/sda [SAT], opened
Feb  2 20:15:14 localhost smartd[1449]: Device: /dev/sda [SAT], found in smartd database.
Feb  2 20:15:15 localhost smartd[1449]: Device: /dev/sda [SAT], is SMART capable. Adding to "monitor" list.
Feb  2 20:15:15 localhost smartd[1449]: Device: /dev/sdb, type changed from 'scsi' to 'sat'
Feb  2 20:15:15 localhost smartd[1449]: Device: /dev/sdb [SAT], opened
Feb  2 20:15:15 localhost smartd[1449]: Device: /dev/sdb [SAT], found in smartd database.
Feb  2 20:15:15 localhost smartd[1449]: Device: /dev/sdb [SAT], is SMART capable. Adding to "monitor" list.
Feb  2 20:15:15 localhost smartd[1449]: Monitoring 2 ATA and 0 SCSI devices
Feb  2 20:15:15 localhost smartd[1452]: smartd has fork()ed into background mode. New PID=1452.
================================================================

You can see that smatrd detected my hard drives, but smartd will never log any SMART information. For instance, if I issue command "killall -USR1 smartd" then smartd nothing writes to console and put just one line to /var/log/messages

Feb  2 20:18:08 localhost smartd[1452]: Signal USR1 - checking devices now rather than in 1627 seconds.

I have tried to replace DEVICESCAN line by "/dev/sda -a -d sat" with several modification, but result was always the same - no SMART info in /var/log/messages.

Surprisingly smartctl command working fine

[root@sadki mkalenkov]# smartctl -i /dev/sda
smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Maxtor DiamondMax Plus 9 family
Device Model:     Maxtor 6Y080P0
Serial Number:    Y2N1P56E
Firmware Version: YAR41BW0
User Capacity:    81 963 220 480 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  ATA/ATAPI-7 T13 1532D revision 0
Local Time is:    Wed Feb  2 20:50:24 2011 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

[root@sadki mkalenkov]# smartctl -i /dev/sdb
smartctl 5.40 2010-10-16 r3189 [i386-redhat-linux-gnu] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.10 family
Device Model:     ST3500630A
Serial Number:    3QG03M18
Firmware Version: 3.AAC
User Capacity:    500 107 862 016 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Wed Feb  2 20:50:28 2011 MSK
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

Commands "smartctl /dev/sda" and "smartctl /dev/sdb" produce expected output with SMART information. 


Version-Release number of selected component (if applicable):
smartmontools-5.40-3.fc13.i686
I have fully updated F13 (i386) PC. The same behaviour is observed on my F14 machine.

Expected results:
I guess that smartd should write SMART information to /var/log/messages regularly.

Comment 1 Michal Hlavinka 2011-02-03 10:07:29 UTC
> Expected results:
> I guess that smartd should write SMART information to /var/log/messages
> regularly.

this is wrong expectation. smartd does not print disk status to syslog when everything is ok, only when there is any problem. See man page:
> DEVICESCAN -H -m root -n standby,10,q
DEVICESCAN = find disks and monitor all of them with following options

-H = report message to syslog ONLY IF the disk is going to fail
-m root = not only report it to syslog but send and email to root too
-n standby = do not test the disk if it's in standby mode
,10 = skip at most 10 tests, after 10 skipped tests wake disk up even if it was in standby mode
,q = do not print any information about skipped tests so you don't wake up the disk just to store the information that the test was skipped