#1892 closed defect (fixed)
smartctl -x return value 4 if SCT ERC is not supported
Reported by: | Matthew Eaton | Owned by: | Christian Franke |
---|---|---|---|
Priority: | minor | Milestone: | Release 7.5 |
Component: | smartctl | Version: | |
Keywords: | ata | Cc: |
Description
I have noticed a possible bug that causes the smartctl -x return value to be 4 instead of 0. It seems to be related to SCT support. On SATA drives that support SCT the return value is 4 while with no SCT support the return value is 0. My smartctl version is pre-7.5 r5618.
The attached logs show smartctl -x output with the return value at the bottom.
- DC600M with H5.1 firmware does not support SCT (smartctl -x returns 0).
- DC600M with H5.3 firmware supports SCT (smartctl -x returns 4).
Attachments (2)
Change History (8)
by , 6 weeks ago
Attachment: | DC600M_H51.txt added |
---|
comment:1 by , 6 weeks ago
Keywords: | ata added |
---|---|
Milestone: | → undecided |
Option -x
is the same as:
-H -i -g all -g wcreorder -c -A -f brief -l xerror,error -l xselftest,selftest -l selective -l directory -l scttemp -l scterc -l devstat -l defects -l sataphy
Please check which option results the exit status 4. The H5.3 drive only advertises data table support, so the only SCT option actually used should be -l scttemp
. Options -g wcreorder
and -l scterc
should not issue SCT commands.
comment:2 by , 6 weeks ago
I was able to narrow it down to -l scterc
. All the other commands returned 0.
smartctl pre-7.5 2024-10-05 r5618 [x86_64-linux-6.8.0-45-generic] (local build) Copyright (C) 2002-24, Bruce Allen, Christian Franke, www.smartmontools.org SCT Error Recovery Control command not supported 4
comment:3 by , 6 weeks ago
Milestone: | undecided → Release 7.5 |
---|---|
Owner: | set to |
Status: | new → accepted |
Thanks for reporting this and testing.
Exit status 4 is also returned if the SCT ERC support bit is not set and only -l scterc
(get) is used. It should only be returned if an actual SCT command failed or if -l scterc,...
(set) is used.
comment:4 by , 6 weeks ago
Summary: | smartctl -x return value 4 → smartctl -x return value 4 if SCT ERC is not supported |
---|
DC600M H5.1 with no SCT support returns 0