21.08 smartd/smartctl "S.M.A.R.T. extra options"

rmr

Dabbler
Joined
Sep 8, 2021
Messages
17
I have a few SATA disks on an HP H240 controller (not RAID) that require that I use smartctl or smartd with "-d sat" (or "-d sat,auto").
This works fine from the command line. Older versions of the smart tools also didn't require this option.
There is a box in Storage->Disks->(Select Disk)->Edit named "S.M.A.R.T. extra options" (see below).
However, for the disks that require this new argument, /etc/smartd.conf is not modified. If I do the same for a plain SATA disk, the argument takes.
Am I understanding this correctly, and should I post a bug report, or is there another way to achieve this? (I tried rebooting just in case)
Symptoms are no self test from the GUI, and no temp monitoring.

Thanks!

Generated /etc/smartd.conf (ignores the drives that need "-d sat"):
Code:
/dev/sdh -a -d removable -n never -W 0,0,0 -m root -M exec /usr/local/libexec/smart_alert.py\
-s S/../.././(06)\
 
/dev/sdi -a -d removable -n never -W 0,0,0 -m root -M exec /usr/local/libexec/smart_alert.py\
-s S/../.././(06)\


Screen Shot 2021-09-08 at 8.21.46 AM.png


HP ProLiant MicroServer Gen10, 32GB ECC Memory, AMD Opteron X3421 APU 4 Core
HP 779134-001 726907-B21 H240 Smart Host Bus Adapter PCIe
Built-in single-port SATA
Intel X520-DA1 INTEL 10GB PCIE SFP+
2 * Seagate ST8000VN 8TB + 2 * WDC WD80EMAZ in RAIDz (all on HP H240)
2 * 100GB Intel SSDSC2 (mirrored) for logs (both on HP H240)
1 * ADATA SU720 480GB + 1 * TS480 GB (mirrored, one on HP H240, one on built-in SATA)
1 * LITEONIT LCS-256L9S-11 256GB SSD as boot on USB
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The link to the manpage from the question mark there indicates you can use -d TYPE, --device=TYPE

Perhaps try the second option.

I don't find it clearly documented anywhere in terms of the required syntax in that field.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
The link to the manpage from the question mark there indicates you can use -d TYPE, --device=TYPE

Perhaps try the second option.

I don't find it clearly documented anywhere in terms of the required syntax in that field.
But then I wouldn't expect it to work with native SATA disks.

Am I understanding this correctly, and should I post a bug report,
It's not clear from the excerpt you posted above, but if indeed the config file gets edited for SATA disks but not for stuff behind the SCSI controller, that sounds like a straightforward bug.
 

rmr

Dabbler
Joined
Sep 8, 2021
Messages
17
The per-disk arguments for smartctl don't seem to take during the initial identification of S.M.A.R.T. capable disks. So "-d type" is useless in the "extra arguments" box.
However, the nice people at ixSystems publish the source code which makes it easy to figure out what's going on. For now, I edited /usr/lib/python3/dist-packages/middlewared/common/smart/smartctl.py (requires middlewared restart). There is a bit of code at the very bottom that enables "-d sat" for some USB bridges on non iX-systems hardware. I just added one more condition and it's working now.
Code:
    if not await middleware.call("system.is_enterprise_ix_hardware"):
        p = await smartctl(args + ["-i"], stderr=subprocess.STDOUT, check=False, encoding="utf8", errors="ignore")
        if "Unknown USB bridge" in p.stdout or "requires option '-d cciss,N'" in p.stdout:
            args = args + ["-d", "sat"]

And I'll try to file a proper bug report.

HP ProLiant MicroServer Gen10, 32GB ECC Memory, AMD Opteron X3421 APU 4 Core
HP 779134-001 726907-B21 H240 Smart Host Bus Adapter PCIe
Built-in single-port SATA
Intel X520-DA1 INTEL 10GB PCIE SFP+
2 * Seagate ST8000VN 8TB + 2 * WDC WD80EMAZ in RAIDz (all on HP H240)
2 * 100GB Intel SSDSC2 (mirrored) for logs (both on HP H240)
1 * ADATA SU720 480GB + 1 * TS480 GB (mirrored, one on HP H240, one on built-in SATA)
1 * LITEONIT LCS-256L9S-11 256GB SSD as boot on USB
 
Top