org.freedesktop.DeviceKit.Disks.Device

org.freedesktop.DeviceKit.Disks.Device — Device interface

Methods

JobCancel                      ()
PartitionTableCreate           (in  's'                              scheme,
                                in  'as'                             options)
PartitionDelete                (in  'as'                             options)
PartitionCreate                (in  't'                              offset,
                                in  't'                              size,
                                in  's'                              type,
                                in  's'                              label,
                                in  'as'                             flags,
                                in  'as'                             options,
                                in  's'                              fstype,
                                in  'as'                             fsoptions,
                                out 'o'                              created_device)
PartitionModify                (in  's'                              type,
                                in  's'                              label,
                                in  'as'                             flags)
FilesystemCreate               (in  's'                              fstype,
                                in  'as'                             options)
FilesystemSetLabel             (in  's'                              new_label)
FilesystemMount                (in  's'                              filesystem_type,
                                in  'as'                             options,
                                out 's'                              mount_path)
FilesystemUnmount              (in  'as'                             options)
FilesystemCheck                (in  'as'                             options,
                                out 'b'                              is_clean)
FilesystemListOpenFiles        (out 'a(uus)'                         processes)
LuksUnlock                     (in  's'                              passphrase,
                                in  'as'                             options,
                                out 'o'                              cleartext_device)
LuksLock                       (in  'as'                             options)
LuksChangePassphrase           (in  's'                              current_passphrase,
                                in  's'                              new_passphrase)
LinuxMdAddComponent            (in  'o'                              component,
                                in  'as'                             options)
LinuxMdRemoveComponent         (in  'o'                              component,
                                in  'as'                             options)
LinuxMdStop                    (in  'as'                             options)
LinuxMdCheck                   (in  'as'                             options,
                                out 't'                              number_of_errors)
DriveInhibitPolling            (in  'as'                             options,
                                out 's'                              cookie)
DriveUninhibitPolling          (in  's'                              cookie)
DrivePollMedia                 ()
DriveEject                     (in  'as'                             options)
DriveDetach                    (in  'as'                             options)
DriveAtaSmartRefreshData       (in  'as'                             options)
DriveAtaSmartGetHistoricalData (in  't'                              since,
                                in  't'                              until,
                                in  't'                              spacing,
                                out 'a(tbbbbdta(usubbybybybbbutay))' data)
DriveAtaSmartInitiateSelftest  (in  's'                              test,
                                in  'as'                             options)

Signals

Changed    ()
JobChanged ('b' job-in-progress,
            'b' job-is-cancellable,
            's' job-id,
            'u' job-initiated-by-uid,
            'd' job-percentage)

Implemented Interfaces

Objects implementing org.freedesktop.DeviceKit.Disks.Device also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Properties

'native-path'                                            read      's'
'device-detection-time'                                  read      't'
'device-media-detection-time'                            read      't'
'device-major'                                           read      'x'
'device-minor'                                           read      'x'
'device-file'                                            read      's'
'device-file-by-id'                                      read      'as'
'device-file-by-path'                                    read      'as'
'device-is-system-internal'                              read      'b'
'device-is-partition'                                    read      'b'
'device-is-partition-table'                              read      'b'
'device-is-removable'                                    read      'b'
'device-is-media-available'                              read      'b'
'device-is-media-change-detected'                        read      'b'
'device-is-media-change-detection-polling'               read      'b'
'device-is-media-change-detection-inhibitable'           read      'b'
'device-is-media-change-detection-inhibited'             read      'b'
'device-is-read-only'                                    read      'b'
'device-is-drive'                                        read      'b'
'device-is-optical-disc'                                 read      'b'
'device-is-mounted'                                      read      'b'
'device-mount-paths'                                     read      'as'
'device-mounted-by-uid'                                  read      'u'
'device-is-luks'                                         read      'b'
'device-is-luks-cleartext'                               read      'b'
'device-is-linux-md-component'                           read      'b'
'device-is-linux-md'                                     read      'b'
'device-size'                                            read      't'
'device-block-size'                                      read      't'
'device-presentation-hide'                               read      'b'
'device-presentation-name'                               read      's'
'device-presentation-icon-name'                          read      's'
'job-in-progress'                                        read      'b'
'job-id'                                                 read      's'
'job-initiated-by-uid'                                   read      'u'
'job-is-cancellable'                                     read      'b'
'job-percentage'                                         read      'd'
'id-usage'                                               read      's'
'id-type'                                                read      's'
'id-version'                                             read      's'
'id-uuid'                                                read      's'
'id-label'                                               read      's'
'luks-holder'                                            read      'o'
'luks-cleartext-slave'                                   read      'o'
'luks-cleartext-unlocked-by-uid'                         read      'u'
'partition-slave'                                        read      'o'
'partition-scheme'                                       read      's'
'partition-type'                                         read      's'
'partition-label'                                        read      's'
'partition-uuid'                                         read      's'
'partition-flags'                                        read      'as'
'partition-number'                                       read      'i'
'partition-offset'                                       read      't'
'partition-size'                                         read      't'
'partition-table-scheme'                                 read      's'
'partition-table-count'                                  read      'i'
'drive-vendor'                                           read      's'
'drive-model'                                            read      's'
'drive-revision'                                         read      's'
'drive-serial'                                           read      's'
'drive-connection-interface'                             read      's'
'drive-connection-speed'                                 read      't'
'drive-media-compatibility'                              read      'as'
'drive-media'                                            read      's'
'drive-is-media-ejectable'                               read      'b'
'drive-can-detach'                                       read      'b'
'optical-disc-is-blank'                                  read      'b'
'optical-disc-is-appendable'                             read      'b'
'optical-disc-is-closed'                                 read      'b'
'optical-disc-num-tracks'                                read      'u'
'optical-disc-num-audio-tracks'                          read      'u'
'optical-disc-num-sessions'                              read      'u'
'drive-ata-smart-is-available'                           read      'b'
'drive-ata-smart-is-failing'                             read      'b'
'drive-ata-smart-is-failing-valid'                       read      'b'
'drive-ata-smart-has-bad-sectors'                        read      'b'
'drive-ata-smart-has-bad-attributes'                     read      'b'
'drive-ata-smart-temperature-kelvin'                     read      'd'
'drive-ata-smart-power-on-seconds'                       read      't'
'drive-ata-smart-time-collected'                         read      't'
'drive-ata-smart-offline-data-collection-status'         read      'u'
'drive-ata-smart-offline-data-collection-seconds'        read      'u'
'drive-ata-smart-self-test-execution-status'             read      'u'
'drive-ata-smart-self-test-execution-percent-remaining'  read      'u'
'drive-ata-smart-short-and-extended-self-test-available' read      'b'
'drive-ata-smart-conveyance-self-test-available'         read      'b'
'drive-ata-smart-start-self-test-available'              read      'b'
'drive-ata-smart-abort-self-test-available'              read      'b'
'drive-ata-smart-short-self-test-polling-minutes'        read      'u'
'drive-ata-smart-extended-self-test-polling-minutes'     read      'u'
'drive-ata-smart-conveyance-self-test-polling-minutes'   read      'u'
'drive-ata-smart-attributes'                             read      'a(usubbybybybbbutay)'
'linux-md-component-level'                               read      's'
'linux-md-component-num-raid-devices'                    read      'i'
'linux-md-component-uuid'                                read      's'
'linux-md-component-name'                                read      's'
'linux-md-component-home-host'                           read      's'
'linux-md-component-version'                             read      's'
'linux-md-component-holder'                              read      'o'
'linux-md-component-state'                               read      'as'
'linux-md-state'                                         read      's'
'linux-md-level'                                         read      's'
'linux-md-uuid'                                          read      's'
'linux-md-home-host'                                     read      's'
'linux-md-name'                                          read      's'
'linux-md-num-raid-devices'                              read      'i'
'linux-md-version'                                       read      's'
'linux-md-slaves'                                        read      'ao'
'linux-md-is-degraded'                                   read      'b'
'linux-md-sync-action'                                   read      's'
'linux-md-sync-percentage'                               read      'd'
'linux-md-sync-speed'                                    read      't'

Description

This interface provides information about a block device on a UNIX-like system. In addition to just providing information, methods can be invoked to perform operations on the block device. Objects implementing this interface have object paths prefixed with /devices/ followed by a sanitized representation of the base name of their native path. As the D-Bus specification greatly limits what characters can be used in object paths, this doesn't necessarily map one to one with the native basename; for example the native path /sys/devices/virtual/block/dm-0 will be represented as /devices/dm_0.

Most methods on this interface take an array of strings for options that can affect what the method does. Some of these options are literal strings (such as noatime) while some are encoded in the form of a key/value pair (such as label=).

A general note about properties: the set of values returned can be expected to grow in the future as both hardware and operating system capabilities evolve. Care has been taken to namespace values so applications can properly fall back (see e.g. drive-media-compatibility) and export both general and specific properties (such as id-usage vs. id-type). In general an empty string in a property means not set. Since the empty string is not a valid object path we use the "/" to mean "not set" for object paths.

Details

JobCancel ()

JobCancel ()

Cancels a job in progress.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.cancel-job-others: To cancel a job initiated by another user


PartitionTableCreate ()

PartitionTableCreate (in  's'  scheme,
                      in  'as' options)

Creates a new partition table. The following partition table schemes are supported:

scheme:

The scheme of the partition table to create.

options:

No options are currently supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device or a partition on it are busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


PartitionDelete ()

PartitionDelete (in  'as' options)

Deletes a partition, removing it from the enclosing partition table.

options:

No options are currently supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


PartitionCreate ()

PartitionCreate (in  't'  offset,
                 in  't'  size,
                 in  's'  type,
                 in  's'  label,
                 in  'as' flags,
                 in  'as' options,
                 in  's'  fstype,
                 in  'as' fsoptions,
                 out 'o'  created_device)

Create a new partition and, optionally, create a file system on it. The partition won't necessarily be created at the exact location requested due to disk geometry constraints.

offset:

Where on the device to create the partition.

size:

Size of the partitition to create.

type:

The type of the partition to create. Valid types depends on the partitioning scheme used:
  • mbr: For the Master Boot Record partitioning scheme, the given type must be a string representation of an integer (both decimal and hexadecimal encodings are accepted) between 0 and 255 both inclusive.
  • gpt: Any valid GUID string.
  • apm: Any valid type for Apple Partition Map for example Apple_Unix_SVR2.

label:

The label to use for the partition. Leave blank if the partition table scheme is mbr.

flags:

Flags to use for the partition. Valid flags depends on the partitioning scheme used:
  • mbr: Only the flag boot is valid.
  • gpt: Only the flag required is valid.
  • apm: The flags allocated, in_use, boot, allow_read, allow_write, boot_code_is_pic are valid.

options:

Currently unused.

fstype:

The file system to create in new partition. Leave blank to skip creating a file system. See the FilesystemCreate() method for details.

fsoptions:

Options to use for file system creation. See the FilesystemCreate() method for details.

created_device:

The object path of the newly added partition.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


PartitionModify ()

PartitionModify (in  's'  type,
                 in  's'  label,
                 in  'as' flags)

Modifies meta data for a partition, such as type, label and flags. TODO: Consider allowing changing offset and size. Or maybe that should be a separate method.

type:

The type of the partition to create. See the type parameter of the PartitionCreate() method for details on valid types.

label:

The label to use for the partition. See the label parameter of the PartitionCreate() method for details on valid labels.

flags:

Flags to use for the partition. See the flags parameter of the PartitionCreate() method for details on valid flags

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the enclosing partition table device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


FilesystemCreate ()

FilesystemCreate (in  's'  fstype,
                  in  'as' options)

Create a file system on a device. If the luks_encrypt= option is passed then an LUKS encrypted block device will be created, then unlocked and the file system will be created on the corresponding cleartext device.

fstype:

The type of file system to create. Pass empty to not create a file system and just clear the areas of the device known to host file system signatures. Use @TODO@ to get a list of file systems that can be created.

options:

To set the label on the file system use the label=NAME option. Labels may not be supported for all file systems and the allowed length of a label may vary (see @TODO@). To create the file system on an LUKS encrypted block device, pass the luks_encrypt= option with the value set to the passphrase to use. For file systems with the concept of owners (e.g. ext3), the options take_ownership_uid= and take_ownership_gid= are supported and can be used to set the initial owner of the created file system.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


FilesystemSetLabel ()

FilesystemSetLabel (in  's' new_label)

Changes the file system label. See the options parameter of FilesystemCreate() method for details of what valid labels are valid.

new_label:

New label for file system.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy and changing the label requires an unmounted file system

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


FilesystemMount ()

FilesystemMount (in  's'  filesystem_type,
                 in  'as' options,
                 out 's'  mount_path)

Mount the device. If the device is referenced in the system-wide /etc/fstab file, the given parameters are all ignored and the device will be attempted to be mounted as the calling user.

filesystem_type:

File system type to use.

options:

Mount Options. Valid mount options include mount options accepted by the native mount program.

mount_path:

Where the device was mounted.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.InvalidOption:

if an invalid or malformed mount option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.filesystem-mount: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.filesystem-mount-system-internal: If the operation is on a system-internal device


FilesystemUnmount ()

FilesystemUnmount (in  'as' options)

Unmount the device. If the device is referenced in the system-wide /etc/fstab file (both at mount time and when this method is invoked), the device will be attempted to be unmounted as the calling user.

options:

Unmount options. Valid options currently include only 'force'.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.InvalidOption:

if an invalid or malformed unmount option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.filesystem-unmount-others: To unmount a device mounted by another user


FilesystemCheck ()

FilesystemCheck (in  'as' options,
                 out 'b'  is_clean)

Perform a non-interactive file system check.

options:

Currently unused.

is_clean:

Returns TRUE if the file system is clean, FALSE if there are errors on the file system.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is mounted and the file system doesn't support online file system checking. See TODO for how to determine if a file system supports online fsck

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.filesystem-check: To check a file system on a non-system-internal device.
  • org.freedesktop.devicekit.disks.filesystem-check-system-internal: To check a file system on a system-internal device.


FilesystemListOpenFiles ()

FilesystemListOpenFiles (out 'a(uus)' processes)

List open files on a mounted file system.

processes:

An array of triples (pid, uid, command line for the process image) for processes currently having open files on the given mounted file system. Note that this operation is not run as a job.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is mounted and the file system doesn't support online file system checking. See TODO for how to determine if a file system supports online fsck

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.filesystem-lsof: To check a file system on a non-system-internal device.
  • org.freedesktop.devicekit.disks.filesystem-lsof-system-internal: To check a file system on a system-internal device.


LuksUnlock ()

LuksUnlock (in  's'  passphrase,
            in  'as' options,
            out 'o'  cleartext_device)

Sets up a cleartext device using the given device as backing store.

passphrase:

Passphrase for unlocking the cleartext data.

options:

Currently unused.

cleartext_device:

The cleartext device created.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.luks-unlock: To unlock LUKS encrypted devices


LuksLock ()

LuksLock (in  'as' options)

Tears down the cleartext device set up using e.g. the LuksUnlock() method.

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.luks-lock-others: To lock an encrypted LUKS device unlocked by another user


LuksChangePassphrase ()

LuksChangePassphrase (in  's' current_passphrase,
                      in  's' new_passphrase)

Change the passphrase used to unlock a LUKS encrypted device.

current_passphrase:

The current passphrase.

new_passphrase:

The new passphrase.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.change: If the operation is on a non-system-internal device
  • org.freedesktop.devicekit.disks.change-system-internal: If the operation is on a system-internal device


LinuxMdAddComponent ()

LinuxMdAddComponent (in  'o'  component,
                     in  'as' options)

Adds a component to a Linux md RAID array. Existing data on the given component will be erased.

component:

Object path of the component to add

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

component to add is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices.


LinuxMdRemoveComponent ()

LinuxMdRemoveComponent (in  'o'  component,
                        in  'as' options)

Removes a component from a Linux md RAID array. The component will be removed and then the signatures on the component will be scrubbed.

component:

The component to remove from the array.

options:

No options are currently supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

component to add is busy

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices.


LinuxMdStop ()

LinuxMdStop (in  'as' options)

Stops a Linux md RAID array.

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices.


LinuxMdCheck ()

LinuxMdCheck (in  'as' options,
              out 't'  number_of_errors)

Checks a Linux md RAID array and returns the number of sectors/page with errors found/fixed. This can only be done if the property linux-md-sync-action is idle.

options:

Use the repair option to fix any problems encountered.

number_of_errors:

Number of mismatched sectors/pages found (or fixed if the repair option is used).

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices.


DriveInhibitPolling ()

DriveInhibitPolling (in  'as' options,
                     out 's'  cookie)

Inhibits the daemon from polling the device for media changes.

options:

Inhibit options. Currently no options are recognized.

cookie:

A cookie that can be used in the DriveUninhibitPolling() method to stop inhibiting polling of the device.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.inhibit-polling: To inhibit polling


DriveUninhibitPolling ()

DriveUninhibitPolling (in  's' cookie)

Uninhibits daemon from polling the device for media changes.

cookie:

A cookie obtained from the DriveInhibitPolling() method.

Errors

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the given cookie is malformed

DrivePollMedia ()

DrivePollMedia ()

Polls the drive for media. This is typically only useful when the device-is-media-change-detected property is FALSE.

Errors

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.inhibit-polling: To inhibit polling


DriveEject ()

DriveEject (in  'as' options)

Ejects media from the device.

options:

Eject options. Currently no options are recognized.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device or a dependent device (e.g. partition or cleartext luks device) is busy (e.g. mounted)

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.InvalidOption:

if an invalid or malformed option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-eject: To eject media from a device


DriveDetach ()

DriveDetach (in  'as' options)

Detachs the device by e.g. powering down the physical port it is connected to. Note that not all devices or ports are capable of this. Check the drive-can-detach property before attempting to invoke this method.

options:

Detach options. Currently no options are recognized.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Busy:

if the device or a dependent device (e.g. partition or cleartext luks device) is busy (e.g. mounted)

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.InvalidOption:

if an invalid or malformed option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-detach: To detach a device


DriveAtaSmartRefreshData ()

DriveAtaSmartRefreshData (in  'as' options)

Refreshes the ATA SMART data for the given drive. Note that this operation is not run as a job.

options:

The option nowakeup can be passed to avoid spinning up the disk if it's in a low-power mode. The option simulate= can be used to pass a path to a blob with libatasmart data to use instead of reading it from the disk. The simulate= option can only be used by the super user.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.NotFound:

If the disk is sleeping and the nowakeup option was passed

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-ata-smart-refresh: Needed to refresh ATA SMART data


DriveAtaSmartGetHistoricalData ()

DriveAtaSmartGetHistoricalData (in  't'                              since,
                                in  't'                              until,
                                in  't'                              spacing,
                                out 'a(tbbbbdta(usubbybybybbbutay))' data)

Retrieves historical ATA SMART data from the drive in the given time interval. Note that this is data collected and stored by the host as ATA SMART capable devices cannot store or return historical data by themselves.

since:

Don't fetch data collected earlier than this point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC).

until:

Don't fetch data collected later than this point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC). If 0 is passed the current time will be used.

spacing:

The minimum spacing (in seconds) between two data points or 0 to get all data points between @since and @until.

data:

An array of historical data sorted by collection date. Each element contains the following members (TODO).

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-ata-smart-retrieve-historical-data: To retrieve historical ATA SMART data


DriveAtaSmartInitiateSelftest ()

DriveAtaSmartInitiateSelftest (in  's'  test,
                               in  'as' options)

Runs a ATA SMART self test on the drive.

test:

The name of the test to run; supported values are 'short' (usually less than ten minutes), 'extended' (usually tens of minutes) and 'conveyance' (usually a few minutes).

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.DeviceKit.Disks.Error.Failed:

if the operation failed

org.freedesktop.DeviceKit.Disks.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-ata-smart-selftest: Needed to run ATA SMART self tests

Signal Details

The Changed signal

Changed ()

Something on the device changed. Changes in job state wont trigger this signal; see the JobChanged() signal.


The JobChanged signal

JobChanged ('b' job-in-progress,
            'b' job-is-cancellable,
            's' job-id,
            'u' job-initiated-by-uid,
            'd' job-percentage)

Emitted when a job on a device changes. Clients should listen to this signal to avoid polling the daemon for job state.

job-in-progress:

Whether a job is currently in progress.

job-is-cancellable:

Whether the job is cancellable.

job-id:

The identifier of the job.

job-initiated-by-uid:

The UNIX user id of the user who initiated the job.

job-percentage:

Percentage completed of the job (between 0 and 100, negative if unknown).

Property Details

The "native-path" property

'native-path'  read      's'

OS specific native path of the device. On Linux this is the sysfs path, for example /sys/devices/pci0000:00/0000:00:1f.2/host2/target2:0:1/2:0:1:0/block/sda.


The "device-detection-time" property

'device-detection-time'  read      't'

The point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC) when the device was detected by the daemon.


The "device-media-detection-time" property

'device-media-detection-time'  read      't'

The point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC) when the media currently in the device was detected by the daemon or 0 if the device has no media.


The "device-major" property

'device-major'  read      'x'

Major for the device or -1 if not set.


The "device-minor" property

'device-minor'  read      'x'

Major for the device or -1 if not set.


The "device-file" property

'device-file'  read      's'

UNIX special device file for device. Example: /dev/sda.


The "device-file-by-id" property

'device-file-by-id'  read      'as'

Symlinks to UNIX special device file that are stable and uniquely identifies the device. Example: /dev/disk/by-id/scsi-SATA_ST910021AS_3MH05AVA, /dev/disk/by-id/ata-ST910021AS_3MH05AVA.


The "device-file-by-path" property

'device-file-by-path'  read      'as'

Symlinks to UNIX special device file that uniquely identifies the port/partition the device is plugged into. Example: /dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:1:0


The "device-is-system-internal" property

'device-is-system-internal'  read      'b'

TRUE if the device is considered system internal. Typically, system internal devices include non-removable internal hard disks and other drives that are not easily added/removed by a local console user. The heuristic typically used is that only devices on removable media and devices connected via Firewire, USB, eSATA and SDIO are considered external.


The "device-is-partition" property

'device-is-partition'  read      'b'

TRUE if the device is a partition. See the properties starting with partition- for details.


The "device-is-partition-table" property

'device-is-partition-table'  read      'b'

TRUE if the device contains a partition table. See partition- properties for details.


The "device-is-removable" property

'device-is-removable'  read      'b'

TRUE if the device contains removable media.


The "device-is-media-available" property

'device-is-media-available'  read      'b'

TRUE if media is available in the device.


The "device-is-media-change-detected" property

'device-is-media-change-detected'  read      'b'

TRUE if media changes are detected.


The "device-is-media-change-detection-polling" property

'device-is-media-change-detection-polling'  read      'b'

TRUE if media changes are detected through the host polling the device, e.g. waking up every two seconds to revalidate the media. This typically keeps the device in a high power state and uses cycles on the CPU. As an example, SATA AN capable optical drives does not need polling.


The "device-is-media-change-detection-inhibitable" property

'device-is-media-change-detection-inhibitable'  read      'b'

TRUE if it is possible to inhibit media detection on the device (to avoid keeping the device in a high power state and waking up the host).


The "device-is-media-change-detection-inhibited" property

'device-is-media-change-detection-inhibited'  read      'b'

TRUE if media detection is inhibited (to avoid keeping the device in a high power state and waking up the host).


The "device-is-read-only" property

'device-is-read-only'  read      'b'

TRUE if the device read-only.


The "device-is-drive" property

'device-is-drive'  read      'b'

TRUE if the device is a drive. See the drive- properties for details.


The "device-is-optical-disc" property

'device-is-optical-disc'  read      'b'

TRUE if the device is an optical drive and an optical disc is inserted. See the optical-disc- properties for details.


The "device-is-mounted" property

'device-is-mounted'  read      'b'

TRUE if the device is mounted.


The "device-mount-paths" property

'device-mount-paths'  read      'as'

A list of paths in the root namespace where the root of the device is mounted. This property is only valid if device-is-mounted is TRUE.


The "device-mounted-by-uid" property

'device-mounted-by-uid'  read      'u'

The UNIX user id of the user who mounted the device. Set to 0 if not mounted by DeviceKit-disks. This property is only valid if device-is-mounted is TRUE.


The "device-is-luks" property

'device-is-luks'  read      'b'

TRUE if device is an LUKS encrypted device. See luks- properties for details.


The "device-is-luks-cleartext" property

'device-is-luks-cleartext'  read      'b'

TRUE if device is a cleartext device backed by a LUKS encrypted device. See luks-cleartext- properties for details.


The "device-is-linux-md-component" property

'device-is-linux-md-component'  read      'b'

TRUE if the device is a Linux md RAID component. See linux-md-component- properties for details.


The "device-is-linux-md" property

'device-is-linux-md'  read      'b'

TRUE if the device is a Linux md RAID array. See linux-md- properties for details.


The "device-size" property

'device-size'  read      't'

The size of the device in bytes.


The "device-block-size" property

'device-block-size'  read      't'

The block size of the device in bytes.


The "device-presentation-hide" property

'device-presentation-hide'  read      'b'

A hint if the device should be hidden from the user interface.


The "device-presentation-name" property

'device-presentation-name'  read      's'

The name to use when presenting the device to an end user.


The "device-presentation-icon-name" property

'device-presentation-icon-name'  read      's'

The icon to use when presenting the device to an end user. If set, must be a name following the freedesktop.org icon theme specification.


The "job-in-progress" property

'job-in-progress'  read      'b'

The job properties specify if a job initiated via the DeviceKit-disks daemon is currently in progress.


The "job-id" property

'job-id'  read      's'

This property is used to identify the job and maps 1-1 with the names of the method calls on this interface, e.g. 'FilesystemCreate' and so on.


The "job-initiated-by-uid" property

'job-initiated-by-uid'  read      'u'

The UNIX user id of the user who initiated the job.


The "job-is-cancellable" property

'job-is-cancellable'  read      'b'

Whether the job can be cancelled using JobCancel() method.


The "job-percentage" property

'job-percentage'  read      'd'

Percentage completed of the job (between 0 and 100, negative if unknown).


The "id-usage" property

'id-usage'  read      's'

A result of probing for signatures on the block device; known values are:

  • filesystem: A mountable file system was detected
  • crypto: Encrypted data (e.g. LUKS) was detected
  • partitiontable: A partition table was detected
  • raid: Used for RAID and LVM components
  • other: A non-standard signature was detected

If blank, no known signature was detected. This doesn't necessarily mean the device contains no structured data; it only means that no signature known to the probing code was detected.


The "id-type" property

'id-type'  read      's'

This property contains more information about the result of probing the block device. It's value depends of the value the id-usage property:

  • filesystem: The mountable file system that was detected (e.g. ext3, vfat)
  • crypto: Known values include crypto_LUKS
  • partitiontable: Known values include mbr (for the Master Boot Record scheme), gpt (for the GUID Partition Table scheme), apm (for the Apple Partition Map scheme).
  • raid: Known values include LVM1_member (for Linux LVM1 components), LVM2_member (for Linux LVM2 components), linux_raid_member (for Linux md (Software RAID) components)
  • other: Known values include swap (for swap space), suspend (data used when resuming from STD)


The "id-version" property

'id-version'  read      's'

The version of the detected file system (or other identified data structure) identified by the id-usage and id-type properties.


The "id-uuid" property

'id-uuid'  read      's'

The UUID (universally unique identifier) of the detected file system (or other identified data structure) identified by the id-usage and id-type properties.


The "id-label" property

'id-label'  read      's'

The user-visible label of the detected file system (or other identified data structure) identified by the id-usage and id-type properties.


The "luks-holder" property

'luks-holder'  read      'o'

The cleartext device that is using the LUKS device. This property is only valid if device-is-luks is TRUE.


The "luks-cleartext-slave" property

'luks-cleartext-slave'  read      'o'

The encrypted LUKS device backing a crypto cleartext device. This property is only valid if device-is-luks-cleartext is TRUE.


The "luks-cleartext-unlocked-by-uid" property

'luks-cleartext-unlocked-by-uid'  read      'u'

The UNIX user id of the user who unlocked the LUKS device. Set to 0 if not unlocked by DeviceKit-disks. This property is only valid if device-is-luks-cleartext is TRUE.


The "partition-slave" property

'partition-slave'  read      'o'

The object path of the partition table the partition is part of. This property is only valid if device-is-partition is TRUE.


The "partition-scheme" property

'partition-scheme'  read      's'

The scheme of the partition table this partition is part of. See the scheme parameter of the PartitionTableCreate() method for details on known partitioning schemes. This property is only valid if device-is-partition is TRUE.


The "partition-type" property

'partition-type'  read      's'

The type of the partition. See the type parameter of the PartitionCreate() method for details on known partitioning types. This property is only valid if device-is-partition is TRUE.


The "partition-label" property

'partition-label'  read      's'

The label of the partition. See the label parameter of the PartitionCreate() method for details on partition labels. This property is only valid if device-is-partition is TRUE.


The "partition-uuid" property

'partition-uuid'  read      's'

The UUID of the partition. See the uuid parameter of the PartitionCreate() method for details on partition UUID's. This property is only valid if device-is-partition is TRUE.


The "partition-flags" property

'partition-flags'  read      'as'

Partition flags. See the flags parameter of the PartitionCreate() method for details on partition flags. This property is only valid if device-is-partition is TRUE.


The "partition-number" property

'partition-number'  read      'i'

Number of the partition. Typically partition numbers start at 1 and are identical to the numbers used by the kernel. Note that partitions may not be sequentially numbered. This property is only valid if device-is-partition is TRUE.


The "partition-offset" property

'partition-offset'  read      't'

Offset in bytes where the partition is located on the enclosing partition table device (see partition-slave). This property is only valid if device-is-partition is TRUE.


The "partition-size" property

'partition-size'  read      't'

Size of the partition in bytes. This property is only valid if device-is-partition is TRUE.


The "partition-table-scheme" property

'partition-table-scheme'  read      's'

The scheme of the partition table. See the scheme parameter of the PartitionTableCreate() method for details on known partitioning schemes. This property is only valid if device-is-partition-table is TRUE.


The "partition-table-count" property

'partition-table-count'  read      'i'

Number of partitions in the partition table. This property is only valid if device-is-partition-table is TRUE.


The "drive-vendor" property

'drive-vendor'  read      's'

Name of the vendor of the drive, for example MATSHITA or BELKIN. This property is only valid if device-is-drive is TRUE.


The "drive-model" property

'drive-model'  read      's'

Name of the model of the drive, for example ST910021AS or USB 2 HS-CF. This property is only valid if device-is-drive is TRUE.


The "drive-revision" property

'drive-revision'  read      's'

Revision of the drive, for example 3.07 or 1.95. This property is only valid if device-is-drive is TRUE.


The "drive-serial" property

'drive-serial'  read      's'

The serial number of the drive or blank if unknown. Examples: 3MH05AVA, A0000001B900. This property is only valid if device-is-drive is TRUE.


The "drive-connection-interface" property

'drive-connection-interface'  read      's'

The interface through which the drive is connected. Known values include:

  • virtual: Device is a composite device e.g. Software RAID or similar
  • ata: Connected via ATA
  • ata_serial: Connected via Serial ATA
  • ata_serial_esata: Connected via eSATA
  • ata_parallel: Connected via Parallel ATA
  • scsi: Connected via SCSI
  • usb: Connected via the Universal Serial Bus
  • firewire: Connected via Firewire
  • sdio: Connected via SDIO
  • platform: Part of the platform, e.g. PC floppy drive

This property is only valid if device-is-drive is TRUE.


The "drive-connection-speed" property

'drive-connection-speed'  read      't'

The nominal speed of the connection interface in bits per second. If unknown this property is set to 0. This property is only valid if device-is-drive is TRUE.


The "drive-media-compatibility" property

'drive-media-compatibility'  read      'as'

An array of media types that can be used in the drive. This property is sometimes set using quirk files if the hardware isn't capable of precisely reporting it. Known values include:

  • flash: Flash Card
  • flash_cf: CompactFlash
  • flash_ms: MemoryStick
  • flash_sm: SmartMedia
  • flash_sd: Secure Digital
  • flash_sdhc: Secure Digital High-Capacity
  • flash_mmc: MultiMediaCard
  • floppy: Floppy Disk
  • floppy_zip: Zip Disk
  • floppy_jaz: Jaz Disk
  • optical: Optical Disc
  • optical_cd: Compact Disc
  • optical_cd_r: Compact Disc Recordable
  • optical_cd_rw: Compact Disc Rewritable
  • optical_dvd: Digital Versatile Disc
  • optical_dvd_r: DVD-R
  • optical_dvd_rw: DVD-RW
  • optical_dvd_ram: DVD-RAM
  • optical_dvd_plus_r: DVD+R
  • optical_dvd_plus_rw: DVD+RW
  • optical_dvd_plus_r_dl: DVD+R Dual Layer
  • optical_dvd_plus_rw_dl: DVD+RW Dual Layer
  • optical_bd: Bluray Disc
  • optical_bd_r: BluRay Recordable
  • optical_bd_re: BluRay Rewritable
  • optical_hddvd: HD DVD
  • optical_hddvd_r: HD DVD Recordable
  • optical_hddvd_rw: HD DVD Rewritable
  • optical_mo: Magneto Optical
  • optical_mrw: Can read Mount Rainer media
  • optical_mrw_w: Can write Mount Rainer media

This property is only valid if device-is-drive is TRUE.


The "drive-media" property

'drive-media'  read      's'

The type of media currently in the drive (blank if no media is available). Known values include the ones listed for the drive-media-compatibility property. This property is only valid if device-is-drive is TRUE.


The "drive-is-media-ejectable" property

'drive-is-media-ejectable'  read      'b'

TRUE only if the media can be physically ejected by issuing a command from the host to the drive (e.g. optical and Zip drives). This property is only valid if device-is-drive is TRUE.


The "drive-can-detach" property

'drive-can-detach'  read      'b'

TRUE only if the drive is capable of being detached by e.g. powering down the port it is connected to. This property is only valid if device-is-drive is TRUE.


The "optical-disc-is-blank" property

'optical-disc-is-blank'  read      'b'

TRUE only if the disc is appendable. This property is only valid if device-is-optical-disc is TRUE.


The "optical-disc-is-appendable" property

'optical-disc-is-appendable'  read      'b'

TRUE only if the disc is appendable. This property is only valid if device-is-optical-disc is TRUE.


The "optical-disc-is-closed" property

'optical-disc-is-closed'  read      'b'

TRUE only if the disc is appendable. This property is only valid if device-is-optical-disc is TRUE.


The "optical-disc-num-tracks" property

'optical-disc-num-tracks'  read      'u'

Number of tracks on the disc. This property is only valid if device-is-optical-disc is TRUE.


The "optical-disc-num-audio-tracks" property

'optical-disc-num-audio-tracks'  read      'u'

Number of audio tracks on the disc. This property is only valid if device-is-optical-disc is TRUE.


The "optical-disc-num-sessions" property

'optical-disc-num-sessions'  read      'u'

Number of sessions on the disc. This property is only valid if device-is-optical-disc is TRUE.


The "drive-ata-smart-is-available" property

'drive-ata-smart-is-available'  read      'b'

TRUE only if drive is capable of reporting ATA SMART data.


The "drive-ata-smart-is-failing" property

'drive-ata-smart-is-failing'  read      'b'

Set to TRUE if ATA SMART indicates that the disk is failing, TRUE otherwise. This property is only valid if drive-ata-smart-time-collected is greater than zero and the property drive-ata-smart-status-valid is TRUE.


The "drive-ata-smart-is-failing-valid" property

'drive-ata-smart-is-failing-valid'  read      'b'

Set to TRUE only if the property drive-ata-smart-status is valid. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-has-bad-sectors" property

'drive-ata-smart-has-bad-sectors'  read      'b'

Set to TRUE if ATA SMART indicates that one or more sectors are bad, TRUE otherwise. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-has-bad-attributes" property

'drive-ata-smart-has-bad-attributes'  read      'b'

Set to TRUE if ATA SMART indicates that one or more attributes are exceeding their threshold, TRUE otherwise. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-temperature-kelvin" property

'drive-ata-smart-temperature-kelvin'  read      'd'

Temperature of the drive in kelvin or 0 if unknown. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-power-on-seconds" property

'drive-ata-smart-power-on-seconds'  read      't'

Seconds the drive has been powered on or 0 if unknown. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-time-collected" property

'drive-ata-smart-time-collected'  read      't'

The point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC) when ATA SMART data was collected. If data was never collected, this property will assume the value 0. This property is only valid if drive-ata-smart-is-available is TRUE.


The "drive-ata-smart-offline-data-collection-status" property

'drive-ata-smart-offline-data-collection-status'  read      'u'

Offline data collection status (TODO: specify values). This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-offline-data-collection-seconds" property

'drive-ata-smart-offline-data-collection-seconds'  read      'u'

Number of seconds needed to perform offline data collection status. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-self-test-execution-status" property

'drive-ata-smart-self-test-execution-status'  read      'u'

Current status of self test (TODO: specify values). This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-self-test-execution-percent-remaining" property

'drive-ata-smart-self-test-execution-percent-remaining'  read      'u'

The progress of an ongoing self test or 0 if no self test is in progress. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-short-and-extended-self-test-available" property

'drive-ata-smart-short-and-extended-self-test-available'  read      'b'

Whether the short and extended self-tests are available. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-conveyance-self-test-available" property

'drive-ata-smart-conveyance-self-test-available'  read      'b'

Whether the conveyance self-test is available. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-start-self-test-available" property

'drive-ata-smart-start-self-test-available'  read      'b'

Whether the start self-test is available. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-abort-self-test-available" property

'drive-ata-smart-abort-self-test-available'  read      'b'

Whether the abort self-test is available. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-short-self-test-polling-minutes" property

'drive-ata-smart-short-self-test-polling-minutes'  read      'u'

Recommended polling time in minutes for short self-test. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-extended-self-test-polling-minutes" property

'drive-ata-smart-extended-self-test-polling-minutes'  read      'u'

Recommended polling time in minutes for extended self-test. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-conveyance-self-test-polling-minutes" property

'drive-ata-smart-conveyance-self-test-polling-minutes'  read      'u'

Recommended polling time in minutes for conveyance self-test. This property is only valid if drive-ata-smart-time-collected is greater than zero.


The "drive-ata-smart-attributes" property

'drive-ata-smart-attributes'  read      'a(usubbybybybbbutay)'

An array of ATA SMART attributes. Each element contains the following members (TODO). This property is only valid if drive-smart-time-collected is greater than zero.


The "linux-md-component-level" property

'linux-md-component-level'  read      's'

The RAID level of the array the component is part of. Known values include

  • linear: The array is Just A Bunch of Disks
  • raid0: RAID-0
  • raid1: RAID-1
  • raid4: RAID-4
  • raid5: RAID-5
  • raid10: RAID-10

This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-num-raid-devices" property

'linux-md-component-num-raid-devices'  read      'i'

The number of component devices in the array the component is part of. This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-uuid" property

'linux-md-component-uuid'  read      's'

The UUID of the array the component is part of. This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-name" property

'linux-md-component-name'  read      's'

The name of the array the component is part of. Blank if the array doesn't have a name (e.g. pre-1.0 meta data). This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-home-host" property

'linux-md-component-home-host'  read      's'

The home host of the array the component is part of, e.g. where it was created. Blank if the array has pre-1.0 meta data. This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-version" property

'linux-md-component-version'  read      's'

The version of superblock of the component. This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-holder" property

'linux-md-component-holder'  read      'o'

The holder of the component or "/" if the component isn't claimed by any array. This property is only valid if device-is-linux-md-component is TRUE.


The "linux-md-component-state" property

'linux-md-component-state'  read      'as'

The state of the component (contents of md/dev-XXX/state file). This property is only valid if device-is-linux-md-component is TRUE and device-is-linux-md-component-holder is non-empty.


The "linux-md-state" property

'linux-md-state'  read      's'

The state of the array (contents of the md/array_state file). This property is only valid if device-is-linux-md is TRUE.


The "linux-md-level" property

'linux-md-level'  read      's'

The RAID level of the array. For known values see the linux-md-component-level property. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-uuid" property

'linux-md-uuid'  read      's'

The UUID of the array. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-home-host" property

'linux-md-home-host'  read      's'

The home host of the array, e.g. where if was created. Blank if the array has pre-1.0 meta data. device-is-linux-md is TRUE.


The "linux-md-name" property

'linux-md-name'  read      's'

The name of the array. Blank if the array doesn't have a name (e.g. pre-1.0 meta data). device-is-linux-md is TRUE.


The "linux-md-num-raid-devices" property

'linux-md-num-raid-devices'  read      'i'

Number of component devices in the array. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-version" property

'linux-md-version'  read      's'

Metadata version used in the components. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-slaves" property

'linux-md-slaves'  read      'ao'

An array of object paths for components currently part of the array. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-is-degraded" property

'linux-md-is-degraded'  read      'b'

TRUE only if the array is running in degraded mode. This property is only valid if device-is-linux-md is TRUE.


The "linux-md-sync-action" property

'linux-md-sync-action'  read      's'

The operation currently pending on the array. Known values include

  • idle: No operation is pending
  • reshape: A reshape is in progress
  • resync: Redudancy is being calculated
  • repair: A repair operation is in progress
  • recover: A hot spare is being built to replace a failed/missing device

This property is only valid if device-is-linux-md is TRUE.


The "linux-md-sync-percentage" property

'linux-md-sync-percentage'  read      'd'

The progress of the current sync operation. This property is only valid if device-is-linux-md is TRUE and the value of the property linux-md-sync-action is not idle.


The "linux-md-sync-speed" property

'linux-md-sync-speed'  read      't'

The speed of the sync operation in bytes per second. This property is only valid if device-is-linux-md is TRUE and the value of the property linux-md-sync-action is not idle.