udisks
udisks copied to clipboard
What is the difference between 'SmartSelftestStatus' and 'SmartFailing' on Drive.Ata interface
The org.freedesktop.UDisks2.Drive.Ata provide properties SmartSelftestStatus and SmartFailing but it is not clear what is the relation between them.
Is SmartFailing a shortcut for when SmartSelftestStatus is in fatal or error_* state or does it mean something different? And why doesn't org.freedesktop.UDisks2.NVMe.Controller have the SmartFailing property?
The
org.freedesktop.UDisks2.Drive.Ataprovide propertiesSmartSelftestStatusandSmartFailingbut it is not clear what is the relation between them.
ATA SMART self-test status is about the last executed self test, while SmartFailing is computed from the attributes continuously updated by the drive. It's a separate set of data from different time. Self tests need to be trigerred manually, it's a separate operation and is not run by the drive itself automatically. Some drives perform transparent scrubbing in the background, that's a vendor-specific internal drive mechanism and mostly opaque to the client.
Is
SmartFailinga shortcut for whenSmartSelftestStatusis infatalorerror_*state or does it mean something different?
Nope, separate functionality as described above.
And why doesn't
org.freedesktop.UDisks2.NVMe.Controllerhave theSmartFailingproperty?
NVMe Health Information is a completely different structure and thus the API is equally different. Check the SmartCriticalWarning property as an equivalent.
Ok, thank you for the explanation. So if I want to report an accurate health status on a front, the best way is to check both SmartSelftestStatus and SmartFailing/SmartCriticalWarning? Do you have a more in-depth but still easy-to-understand documentation about SMART?
Well the self test status is perhaps not so interesting to the end user since the last run may have been a long time ago. Besides, most drives do update the attribute table accordingly, so unless you've trigerred the self test from your side and waiting for the result, using the generally available properties is the preferred way to go.
ATA SMART, SCSI SMART and NVMe Health Information are vastly different technologies and you need to interpret them individually. I'm not aware of any easy-to-read howto unfortunately.
Ok, thanks a lot for answering my questions! May I suggest the API documentation be expanded to include those explanations?
May I suggest the API documentation be expanded to include those explanations?
Yeah, I think we can extend the docs with some overview. Certainly not anytime near, we're too busy with other things. This leaves room for community contributions.
There is some SMART-related documentation available through the libblockdev smart plugin docs, that's mostly useful for application developers though, less for consumers of the UDisks API.
SMART statuses with NVME M.2 SSDs are not supported with udisks and gnome-disk-utility - not to this day.
I can use the shell:
~$ sudo smartctl -a /dev/nvme0n1 | grep health
SMART overall-health self-assessment test result: PASSED
System: Linux Mint 22.1 Cinnamon Xia
CPU: 8-core AMD Ryzen 7 3700X (-MT MCP-) speed/min/max: 987/550/4980 MHz
Kernel: 6.11.0-29-generic x86_64 Up: 4h 8m Mem: 3.21/31.25 GiB (10.3%)
Storage: 2.51 TiB (23.1% used) Procs: 451 Shell: Bash 5.2.21 inxi: 3.3.34
SMART statuses with NVME M.2 SSDs are not supported with udisks and gnome-disk-utility - not to this day.
Please don't post off-topic comments. NVMe health information has been available since the udisks-2.10.0 release.