But with --health it returns with success:
# smartctl --health /dev/sdh; echo $?
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.15.0-88-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
0
These errors in the logs are past errors. It does not indicate the drive is failing. For example an error log like this is generated if `smartctl --test=short --captive` is ran. Because the kernel detects that the drive didn't respond in a long time, then resets the drive with `ataX: hard resetting link` in dmesg. There seems to be no way of clearing these logs, so the drive will report as Failed in MaaS forever if --xall is used.
Maybe instead of --xall it would be better to use --health?
For me smartctl --xall exits with code 64: linux-4. 15.0-88- generic] (local build)
# smartctl --xall /dev/sdh; echo $?
smartctl 6.6 2016-05-31 r4324 [x86_64-
...snip...
SMART Extended Comprehensive Error Log Version: 1 (5 sectors)
Device Error Count: 4
...snip...
64
But with --health it returns with success: linux-4. 15.0-88- generic] (local build) ls.org
# smartctl --health /dev/sdh; echo $?
smartctl 6.6 2016-05-31 r4324 [x86_64-
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontoo
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
0
These errors in the logs are past errors. It does not indicate the drive is failing. For example an error log like this is generated if `smartctl --test=short --captive` is ran. Because the kernel detects that the drive didn't respond in a long time, then resets the drive with `ataX: hard resetting link` in dmesg. There seems to be no way of clearing these logs, so the drive will report as Failed in MaaS forever if --xall is used.