Top |
org.freedesktop.UDisks2.Drive.Ataorg.freedesktop.UDisks2.Drive.Ata — Disk drives using the ATA command-set |
SmartUpdate (IN a{sv} options); SmartGetAttributes (IN a{sv} options, OUT a(ysqiiixia{sv}) attributes); SmartSelftestStart (IN s type, IN a{sv} options); SmartSelftestAbort (IN a{sv} options); SmartSetEnabled (IN b value, IN a{sv} options); PmGetState (IN a{sv} options, OUT y state); PmStandby (IN a{sv} options); PmWakeup (IN a{sv} options); SecurityEraseUnit (IN a{sv} options);
SmartSupported readable b SmartEnabled readable b SmartUpdated readable t SmartFailing readable b SmartPowerOnSeconds readable t SmartTemperature readable d SmartNumAttributesFailing readable i SmartNumAttributesFailedInThePast readable i SmartNumBadSectors readable x SmartSelftestStatus readable s SmartSelftestPercentRemaining readable i PmSupported readable b PmEnabled readable b ApmSupported readable b ApmEnabled readable b AamSupported readable b AamEnabled readable b AamVendorRecommendedValue readable i WriteCacheSupported readable b WriteCacheEnabled readable b ReadLookaheadSupported readable b ReadLookaheadEnabled readable b SecurityEraseUnitMinutes readable i SecurityEnhancedEraseUnitMinutes readable i SecurityFrozen readable b
Objects implementing this interface also implement the org.freedesktop.UDisks2.Drive interface.
SmartUpdate (IN a{sv} options);
Reads SMART data from the drive and update relevant properties.
If the option nowakeup
is given and the disk is in a sleeping
state, the error
org.freedesktop.UDisks2.Error.WouldWakeup
is
returned.
The option atasmart_blob
can be used to inject libatasmart
compatible blobs for testing how clients react to different
kinds of SMART data. This option may be removed in the future
without it being considered an ABI break.
|
Options - known options (in addition to standard options) includes |
SmartGetAttributes (IN a{sv} options, OUT a(ysqiiixia{sv}) attributes);
Get the SMART attributes. Each attribute is a struct with the following members:
id (type 'y') |
Attribute Identifier |
name (type 's') |
The identifier as a string. |
flags (type 'q') |
16-bit attribute flags (bit 0 is prefail/oldage, bit 1 is online/offline). |
value (type 'i') |
The current value or -1 if unknown. |
worst (type 'i') |
The worst value of -1 if unknown. |
threshold (type 'i') |
The threshold or -1 if unknown. |
pretty (type 'x') |
An interpretation of the value - must be ignored if |
pretty_unit (type 'i') |
The unit of the |
expansion (type 'a{sv}') |
Currently unused. Intended for future expansion. |
The name
parameter should be used as the authoritative identifier for the attribute since it is derived from the numerical id
and the disk's IDENTIFY
data and thus handles ID collisions between drives of different make and model.
|
Options - known options (in addition to standard options) includes |
|
The SMART attributes. |
SmartSelftestStart (IN s type, IN a{sv} options);
Starts a SMART selftest. The type
parameter is for the type
of test to start - valid values are short
,
extended
and conveyance
.
Note that the method returns immediately after the test has been started successfully.
|
The type test to run. |
|
Options (currently unused except for standard options). |
SmartSelftestAbort (IN a{sv} options);
Aborts a running SMART selftest.
|
Options (currently unused except for standard options). |
SmartSetEnabled (IN b value, IN a{sv} options);
Sets whether SMART is enabled for the drive. This setting is stored in the non-volatile memory in the drive itself and does not need to be refreshed every time the drive is powered on or connected.
Since this may require authentication and thus may fail, it is implemented this way instead of the "SmartEnabled" property being writable.
|
|
|
Options (currently unused except for standard options). |
Since 2.0.0
PmGetState (IN a{sv} options, OUT y state);
Get the current power mode status. This is implemented as a method call as it involves sending a command from the host to the drive and no change notification is available.
The format of state
is the result obtained from sending the
ATA command “CHECK POWER MODE” to the drive.
Known values include
0x00 |
Standby |
0x80 |
Idle |
0xff |
Active/Idle |
Typically user interfaces will report "Drive is spun down" if state
is
0x00 and "Drive is spun up" otherwise.
|
Options (currently unused except for standard options). |
|
The current power state. |
PmStandby (IN a{sv} options);
Force the drive to immediately enter the low power consumption standby mode, usually causing it to spin down. This is done by sending the ATA command “STANDBY IMMEDIATE” to the drive.
|
Options (currently unused except for standard options). |
PmWakeup (IN a{sv} options);
Force the drive to immediately wake up (exiting the low power consumption standby mode), usually causing it to spin up. This is done by reading data from the disk.
|
Options (currently unused except for standard options). |
SecurityEraseUnit (IN a{sv} options);
Does all the necessary checks and preparations and then sends
the “SECURITY ERASE UNIT” command to the
drive. If the option enhanced
is set to TRUE
an
enhanced secure erase is requested.
All data on the drive will be irrevocably erased.
This operation takes either
"SecurityEraseUnitMinutes" or
"SecurityEnhancedEraseUnitMinutes"
minutes to complete depending on whether the enhanced
option
is TRUE
.
|
Options - known options (in addition to standard options) includes |
SmartUpdated readable t
The point in time (seconds since the Unix Epoch) that the SMART status was updated or 0 if never updated.
The value of the other properties related to SMART are not meaningful if this proeprty is 0.
SmartFailing readable b
Set to TRUE
if disk is about to fail.
This value is read from the disk itself and does not include any interpretation.
SmartPowerOnSeconds readable t
The amount of time the disk has been powered on (according to SMART data) or 0 if unknown.
SmartTemperature readable d
The temperature (in Kelvin) of the disk according to SMART data or 0 if unknown.
SmartNumAttributesFailing readable i
The number of attributes failing right now or -1 if unknown.
SmartNumAttributesFailedInThePast readable i
The number of attributes that have failed in the past or -1 if unknown.
SmartNumBadSectors readable x
The number of bad sectors (ie. pending and reallocated) or -1 if unknown.
SmartSelftestStatus readable s
The status of the last self-test. Known values include
success |
Last self-test was a success (or never ran). |
aborted |
Last self-test was aborted. |
interrupted |
Last self-test was interrupted. |
fatal |
Last self-test did not complete. |
error_unknown |
Last self-test failed (Unknown). |
error_electrical |
Last self-test failed (Electrical). |
error_servo |
Last self-test failed (Servo). |
error_read |
Last self-test failed (Read). |
error_handling |
Last self-test failed (Damage). |
inprogress |
Self-test is currently in progress. |
SmartSelftestPercentRemaining readable i
The percent remaining or -1 if unknown.
ApmSupported readable b
Whether the drive supports Advanced Power Management (APM).
AamSupported readable b
Whether the drive supports Automatic Acoustic Management (AAM).
AamEnabled readable b
Whether Automatic Acoustic Management (AAM) is enabled.
AamVendorRecommendedValue readable i
The vendor-recommended AAM value (or 0 if AAM is not supported).
WriteCacheSupported readable b
Whether the drive supports configuring the write cache.
Since 2.0.0
WriteCacheEnabled readable b
Whether the write-cache is enabled (or FALSE
if not supported).
Since 2.0.0
ReadLookaheadSupported readable b
Whether the drive supports configuring the read look-ahead.
Since 2.1.7
ReadLookaheadEnabled readable b
Whether the read look-ahead is enabled (or FALSE
if not supported).
Since 2.1.7
SecurityEraseUnitMinutes readable i
The estimated amount of minutes it takes to complete the “SECURITY ERASE UNIT” command or 0 if this command is not available.
If set to 510 it means that it takes at least 508 minutes to complete the operation.
SecurityEnhancedEraseUnitMinutes readable i
The estimated amount of minutes it takes to complete the “SECURITY ERASE UNIT” command with enhanced mode specified or 0 if enhanced erase is not available.
If set to 510 it means that it takes at least 508 minutes to complete the operation.