#118 SMART monitoring unusable

9.1.0.1
open
nobody
None
3
2014-08-17
2013-07-18
Alan Burlison
No

If I enable SMART monitoring for a disk under Disks|Management|Disk|Edit ("Activate S.M.A.R.T. monitoring for this device") and then navigate to Disks|Management|S.M.A.R.T. and enable that, save & restart then I get "Error: The changes could not be applied (error code 1)." in the web interface and the following entries in syslog:

root: Failed to start service smartd
root: /etc/rc.d/smartd: WARNING: failed to start smartd
smartd[19478]: Unable to register device /dev/ada0 (no Directive -d removable). Exiting.
smartd[19478]: Unable to register ATA device /dev/ada0 at line 1 of file /var/etc/smartd.conf

If I manually use smartclt on the disks in question it works fine - I can see the SMART data, run tests, print the results etc.

Discussion

  • zoon01
    zoon01
    2013-07-27

    Could you please provide your nas4free version,

    On rev 804 i'm not able to reproduce this error.
    Also did you try to reboot the nas after the changes?
    Also do you make use of a (raid)controller card with your drives connected to it?

    Regards,
    zoon01

     
    Last edit: zoon01 2013-07-27
  • Alan Burlison
    Alan Burlison
    2013-07-27

    Here are the details. It's been the same over the last 3 NAS4Free versions. Rebooting makes no difference - during reboot I see a "WARNING: failed to start smartd" error. There is no RAID card involved, the disks are connected to the SATA ports on the motherboard.

    Version 9.1.0.1 - Sandstorm (revision 804)
    Build date Wed Jul 24 22:23:09 CEST 2013
    Platform OS FreeBSD 9.1-RELEASE-p4 (kern.osreldate: 901000)
    Platform x64-embedded on Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz
    System Shuttle Inc FG31
    System bios Phoenix Technologies, LTD version: 6.00 PG 07/02/2009

     
  • Alan Burlison
    Alan Burlison
    2013-07-29

    Here are the errors from the smartd log if I enable it and reboot (reverse order):

    ul 27 19:20:54 nasty smartd[2399]: Unable to register device /dev/ada0 (no Directive -d removable). Exiting.
    Jul 27 19:20:54 nasty smartd[2399]: Unable to register ATA device /dev/ada0 at line 1 of file /var/etc/smartd.conf
    Jul 27 19:20:54 nasty smartd[2399]: Device: /dev/ada0, not ATA, no IDENTIFY DEVICE Structure
    Jul 27 19:20:54 nasty smartd[2399]: Device: /dev/ada0, opened
    Jul 27 19:20:54 nasty smartd[2399]: Configuration file /var/etc/smartd.conf parsed.
    Jul 27 19:20:54 nasty smartd[2399]: Opened configuration file /var/etc/smartd.conf
    Jul 27 19:20:54 nasty smartd[2399]: Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
    Jul 27 19:20:54 nasty smartd[2399]: smartd 6.1 2013-03-16 r3800 [FreeBSD 9.1-RELEASE-p4 amd64] (local build)

    Yet if I read the device SMART status with smartctl it works fine:

    smartctl -H /dev/ada0

    smartctl 6.1 2013-03-16 r3800 [FreeBSD 9.1-RELEASE-p4 amd64] (local build)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED

     
  • Dave
    Dave
    2013-08-01

    Adding a +1, I get exactly the same thing, smartd fails to start, but doing it manually via smartctl works fine.

     
  • Alex Lin
    Alex Lin
    2013-08-15

    Hi Alan / Dave,

    Can you please provide the output from the following command via console :

    /etc/rc.d/smartd onemkconf && cat /var/etc/smartd.conf
    
     
  • Alan Burlison
    Alan Burlison
    2013-08-15

    (email addresses obscured, but are the same in both lines)

    # /etc/rc.d/smartd onemkconf && cat /var/etc/smartd.conf
    /dev/ada0 -a -d ata -T permissive -s (S/../.././01) -W 5,40,50 -n standby,q -m xxx@gmail.com -M exec /etc/mail/smartdreport.sh -M test
    /dev/ada1 -a -d ata -T permissive -s (S/../.././01) -W 5,40,50 -n standby,q -m xxx@gmail.com -M exec /etc/mail/smartdreport.sh -M test
    
     
  • Alex Lin
    Alex Lin
    2013-08-15

    Ok cool. Next can you please provide the output for the following command :-

    /usr/local/sbin/smartctl -a -d auto /dev/ada0

     
  • Dave
    Dave
    2013-08-15

    Here's mine:

    # /etc/rc.d/smartd onemkconf && cat /var/etc/smartd.conf
    /dev/ada0 -a -d ata -T permissive -W 0,0,0 -n standby,q
    /dev/da0 -a -d scsi -T permissive -W 0,0,0 -n standby,q
    /dev/da1 -a -d scsi -T permissive -W 0,0,0 -n standby,q
    

    (The two "SCSI" targets are USB keys, the only SATA device is the first one).

     
    • Alex Lin
      Alex Lin
      2013-08-15

      Ok.

      Can you run

      /usr/local/sbin/smartctl -a -d auto /dev/[device that cannot register] ( e.g. in your case ada0, da0])

       
  • Dave
    Dave
    2013-08-15

    # /usr/local/sbin/smartctl -a -d auto /dev/ada0
    smartctl 6.1 2013-03-16 r3800 [FreeBSD 9.1-RELEASE-p4 amd64] (local build)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Device Model:     KingFast
    Serial Number:    000000000000000001CA
    Firmware Version: 120810
    User Capacity:    7,012,196,352 bytes [7.01 GB]
    Sector Size:      512 bytes logical/physical
    Rotation Rate:    Solid State Device
    Device is:        Not in smartctl database [for details use: -P showall]
    ATA Version is:   ATA8-ACS (minor revision not indicated)
    SATA Version is:  SATA 2.6, 3.0 Gb/s
    Local Time is:    Thu Aug 15 21:27:52 2013 AEST
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x00) Offline data collection activity
                                            was never started.
                                        Auto Offline Data Collection: Disabled.
    Total time to complete Offline
    data collection:                (   30) seconds.
    Offline data collection
    capabilities:                    (0x00)         Offline data collection not supported.
    SMART capabilities:            (0x0003) Saves SMART data before entering
                                            power-saving mode.
                                            Supports SMART auto save timer.
    Error logging capability:        (0x00) Error logging NOT supported.
                                        No General Purpose Logging support.
    
    SMART Attributes Data Structure revision number: 16
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000b   100   100   000    Pre-fail  Always       -       0
    [...]
    173 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       3211293
    
    SMART Error Log not supported
    
    SMART Self-test Log not supported
    
    Selective Self-tests/Logging not supported
    
     
    • Alex Lin
      Alex Lin
      2013-08-15

      Hi Dave,

      Great ! That means your SSD does have S.M.A.R.T. support.

      Can you run the following command :-
      /usr/local/sbin/smartctl -d test /dev/ada0

      background : your smartd fails to start because one of the hard disks -d type is generated incorrectly, I am trying to see what goes wrong here.

       
      Last edit: Alex Lin 2013-08-15
  • Alan Burlison
    Alan Burlison
    2013-08-15

    /usr/local/sbin/smartctl -a -d auto /dev/ada0 output attached

     
    Attachments
  • Dave
    Dave
    2013-08-15

    # /usr/local/sbin/smartctl -d test /dev/ada0
    smartctl 6.1 2013-03-16 r3800 [FreeBSD 9.1-RELEASE-p4 amd64] (local build)
    Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
    
    /dev/ada0: Device of type 'atacam' [ATA] detected
    /dev/ada0: Device of type 'atacam' [ATA] opened
    

    That's all the output.

     
  • Alex Lin
    Alex Lin
    2013-08-15

    Hi Dave and Alan,

    Thank you for your patience.

    I can now why it doesn't detect properly. This is because existing code does not due to FreeBSD CAM subsystem properly.

    This is actually resolved in the experimental build I am working on :-

    http://forums.nas4free.org/viewtopic.php?f=17&t=4727

    If you are brave enough, you may give the experimental build a try, or you can wait till it's deemed stable to integrate to main distribution, and then upgrade.

    While I cannot say for sure that it is totally bug free yet, I have been receiving positive feedback from a few users.

    Cheers,
    Alex Lin

     
  • Dave
    Dave
    2013-08-15

    Thanks! I'll probably have to wait till it's in the main distribution, since it's a shared server and I'd hear about problems pretty quickly if anything goes wrong :-).

     
  • Alan Burlison
    Alan Burlison
    2013-08-15

    I'll have to wait as well - the system in question is in production.

     
  • Dave
    Dave
    2013-08-19

    Should this have been fixed in .847? I've just upgraded and I'm still getting the same problem.

     
  • Robb Stark
    Robb Stark
    2014-02-22

    The problem persists in .943. Is there any solution?

     
  • Alan Burlison
    Alan Burlison
    2014-02-23

    Confirmed here as well - it's still broken in .943