SOLVED How to configure smartd to ignore a SMART attribute?

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Just thinking out loud here about an alternate method to make this happen... You could create a FreeBSD jail, then update the SMART application in there, make it, and then run a script to check your drives (controlled by Cron) as desired and then turn off SMART for the basic TrueNAS environment. Now you have almost the best setup. But if doing it this way then I'd setup daily short tests and weekly long tests, and of course email notifications of the results. You can set it up to only email you on failures encountered. My script changed the Subject line of the email to indicate All is Good or Warning or Failure based on what the drives report. But that is just an option and it would allow the changed to remain after reboot or an upgrade. It also provides you a testing ground.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If updating the header is enough, you could just try changing the line:
"RENICE Z2|" // tested with RENICE Z2/2030

to

"RENICE (Z2|X2)|" // tested with RENICE Z2/2030
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
It seems the topic addressed and some solutions proposed. Thanks!

Although I won't try them in the near future (other personal priorities), I hope to try them later (yeah, you know how it goes... :smile:).
The temporary (which might be permanent! :tongue:) workaround is to disable SMART on this disk (I'm fine with that since it's the boot drive and it's the backup server).
I'll set this thread to SOLVED.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If updating the header is enough, you could just try changing the line:
Just for my own entertainment and having a problem with a recently shucked Easystore not being recognized due to an apparently new model number, I tested and confirmed that the procedure below works to have the drive (and associated attributes) recognized properly by smartctl:

My Easystore drive is a white label Ultrastar HE 12, but the previous header file(s) (I note that I edited both the drivedb.h and drivedb.h.raw) didn't have it covered.

In /usr/local/share/smartmontools, I opened drivedb.h and looked for the entry that should be matching my drive by searching for WD120 (since the model is actually "WDC WD120EDBZ-11"

I found this entry which should match that drive...

Code:
  { "Western Digital Ultrastar He10/12", // WD white label, tested with

      // WDC WD80EMAZ-00WJTA0/83.H0A83 (Easystore 0x1058:0x25fb),

      // WDC WD80EZAZ-11TDBA0/83.H0A83, WDC WD100EMAZ-00WJTA0/83.H0A83,

      // WDC WD100EZAZ-11TDBA0/83.H0A83, WDC WD120EMAZ-11BLFA0/81.00A81

    "WDC WD(80|100|120)E[MZ]AZ-.*",

    "", "",

    "-v 22,raw48,Helium_Level"

  },


The problem is with the regex "WDC WD(80|100|120)E[MZ]AZ-.*" which expects the last part before the das to be AZ, not BZ like mine is and the part before that to be E or EMZ, not EDB like mine

So I messed with it a bit and came up with this: "WDC WD(80|100|120)E[(MZ|D)](AZ|BZ)-.*"

Before saving the file, I gave it a quick test with:

dmesg | egrep "WDC WD(80|100|120)E[(MZ|D)](AZ|BZ)-.*"

I then updated the file so it looks like this:

Code:
  { "Western Digital Ultrastar He10/12", // WD white label, tested with
      // WDC WD80EMAZ-00WJTA0/83.H0A83 (Easystore 0x1058:0x25fb),
      // WDC WD80EZAZ-11TDBA0/83.H0A83, WDC WD100EMAZ-00WJTA0/83.H0A83,
      // WDC WD100EZAZ-11TDBA0/83.H0A83, WDC WD120EMAZ-11BLFA0/81.00A81,
      // WDC WD120EDBZ-11
    "WDC WD(80|100|120)E[(MZ|D)](AZ|BZ)-.*",
    "", "",
    "-v 22,raw48,Helium_Level"
  },


I made the same changes to the .raw file too.

I then restarted the smartmon daemon:
service smartd-daemon restart

And tested with smartctl -a /dev/da17
results if you're curious which shows the helium level previously showing as unknown attribute 22:
Code:
=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Ultrastar He10/12
Device Model:     WDC WD120EDBZ-11B1HA0
Serial Number:    ********
LU WWN Device Id: 5 000cca 2b0ce713f
Firmware Version: 85.00A85
User Capacity:    12,000,138,625,024 bytes [12.0 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep  6 17:15:37 2021 CEST
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:  (0x82)    Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)    The previous self-test routine completed
                    without error or no self-test has ever
                    been run.
Total time to complete Offline
data collection:         (   87) seconds.
Offline data collection
capabilities:              (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003)    Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01)    Error logging supported.
                    General Purpose Logging supported.
Short self-test routine
recommended polling time:      (   2) minutes.
Extended self-test routine
recommended polling time:      (1292) minutes.
SCT capabilities:            (0x003d)    SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

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   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   127   127   054    Old_age   Offline      -       111
  3 Spin_Up_Time            0x0007   100   100   024    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       7
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   067    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   128   128   020    Old_age   Offline      -       18
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       479
10 Spin_Retry_Count        0x0012   100   100   060    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       7
22 Helium_Level            0x0023   100   100   025    Pre-fail  Always       -       100
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       27
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       27
194 Temperature_Celsius     0x0002   166   166   000    Old_age   Always       -       39 (Min/Max 24/40)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

I should note that these changes would likely be lost with a system update, so the clever thing to do here would be to pass the feedback to the github project for smartmontools and have the model recognized there so any future updates include it, but in any case, edits can be re-done if they are sufficient.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I noticed that my WD Purple 10TB and 12TB weren't being recognised as having Helium either (even though they were reporting the attribute 22 value), so I also changed it to this:

Code:
  { "Western Digital Red Pro/Purple", // tested with WDC WD2001FFSX-68JNUN0/81.00A81,
      // WDC WD6002FFWX-68TZ4N0/83.H0A83, WDC WD101KFBX-68R56N0/83.H0A03
    "WDC WD([2-68]00[123]FF[BSW]|101KFB|101PUR|121PUR)[X|Z]-.*",
    "", "",
    "-v 22,raw48,Helium_Level" // WD101KFBX
  },


I know I'm hijacking the RED Pro here, but I think it's effectively the same beast.

The other Purples already there don't have the helium attribute.
 
Last edited:
Top