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)
DriveEject                  (in  'as'                 options)
DriveSmartRefreshData       (in  'as'                 options)
DriveSmartGetHistoricalData (in  't'                  since,
                             in  't'                  until,
                             out 'a(tdtsba(isiiiis))' data)
DriveSmartInitiateSelftest  (in  's'                  test,
                             in  'b'                  captive)

Signals

Changed    ()
JobChanged ('b' job-in-progress,
            'b' job-is-cancellable,
            's' job-id,
            'u' job-initiated-by-uid,
            'i' job-num-tasks,
            'i' job-cur-task,
            's' job-cur-task-id,
            'd' job-cur-task-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-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-read-only'                 read      'b'
'device-is-drive'                     read      'b'
'device-is-optical-disc'              read      'b'
'device-is-mounted'                   read      'b'
'device-mount-path'                   read      's'
'device-mounted-by-uid'               read      'u'
'device-is-luks-cleartext'            read      'b'
'device-is-busy'                      read      'b'
'device-is-linux-md-component'        read      'b'
'device-is-linux-md'                  read      'b'
'device-size'                         read      't'
'device-block-size'                   read      't'
'job-in-progress'                     read      'b'
'job-id'                              read      's'
'job-initiated-by-uid'                read      'u'
'job-is-cancellable'                  read      'b'
'job-num-tasks'                       read      'i'
'job-cur-task'                        read      'i'
'job-cur-task-id'                     read      's'
'job-cur-task-percentage'             read      'd'
'id-usage'                            read      's'
'id-type'                             read      's'
'id-version'                          read      's'
'id-uuid'                             read      's'
'id-label'                            read      's'
'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'
'partition-table-max-number'          read      'i'
'partition-table-offsets'             read      'at'
'partition-table-sizes'               read      'at'
'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-requires-eject'                read      'b'
'optical-disc-is-recordable'          read      'b'
'optical-disc-is-rewritable'          read      'b'
'optical-disc-is-blank'               read      'b'
'optical-disc-is-appendable'          read      'b'
'optical-disc-is-closed'              read      'b'
'optical-disc-has-audio'              read      'b'
'optical-disc-num-tracks'             read      'u'
'optical-disc-num-sessions'           read      'u'
'drive-smart-is-capable'              read      'b'
'drive-smart-is-enabled'              read      'b'
'drive-smart-time-collected'          read      't'
'drive-smart-is-failing'              read      'b'
'drive-smart-temperature'             read      'd'
'drive-smart-time-powered-on'         read      't'
'drive-smart-last-self-test-result'   read      's'
'drive-smart-attributes'              read      'a(isiiiis)'
'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-version'          read      's'
'linux-md-component-update-time'      read      't'
'linux-md-component-events'           read      't'
'linux-md-level'                      read      's'
'linux-md-num-raid-devices'           read      'i'
'linux-md-version'                    read      's'
'linux-md-slaves'                     read      'ao'
'linux-md-slaves-state'               read      'as'
'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 remount) while some are encoded in the form of a key/value pair (such as label=). While the documentation for each method will specify exactly what set of options are recognized, many methods accepts the erase= option that can be used to erase the contents of the device prior to starting the operation. Instead of repeating what values can be used in the the erase= option in every method that supports it, we will enumerate them only once:

  • none: Only areas of the device known to host file system signatures will be overwritten with zeros
  • full: Zeroes will be written out once on the device
  • full3pass: Writes random data on the device three times
  • full7pass: Writes random data on the device seven times
  • full35pass: Writes random data on the device 35 times

The data written out is not entirely random, see the Gutmann Method for more details.

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 no job is pending

org.freedesktop.DeviceKit.Disks.Error.NotCancellable:

if job is not cancellable

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.cancel-job-others: To cancel a job on a non-system-internal device initiated by another user
  • org.freedesktop.devicekit.disks.cancel-job-others-system-internal: To cancel a job on a system-internal device 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:

Supports the erase= option for erasing the contents of the device.

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 incoming parameters are invalid or an unknown error occured

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:

Supports the erase= option for erasing the contents of the device.

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotPartition:

if the device is not a partition

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotPartitionTable:

if the device is not a partitition table

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotPartition:

if the device is not a partition

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:

Supports the erase= option for erasing the contents of the device. To set the label use label=NAME. 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 incoming parameters are invalid or an unknown error occured

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 file system doesn't support labels, the label is too long

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 'remount' and other 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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotFilesystem:

if the device is not a mountable file system

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

if an invalid or malformed mount option was given

org.freedesktop.DeviceKit.Disks.Error.AlreadyMounted:

if the device is already mounted

org.freedesktop.DeviceKit.Disks.Error.NotMounted:

if the remount option was given and the device wasn't mounted

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 incoming parameters are invalid or an unknown error occured

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

org.freedesktop.DeviceKit.Disks.Error.NotMounted:

if the device is not mounted

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.filesystem-unmount-others: To unmount a non-system-internal device mounted by another user
  • org.freedesktop.devicekit.disks.filesystem-unmount-others-system-internal: To unmount a system-internal 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 incoming parameters are invalid or an unknown error occured

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 incoming parameters are invalid or an unknown error occured

org.freedesktop.DeviceKit.Disks.Error.NotFilesystem:

if the device is not a mountable file system

org.freedesktop.DeviceKit.Disks.Error.NotMounted:

if the file system is not mounted

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLuks:

if the device is not LUKS encrypted

org.freedesktop.DeviceKit.Disks.Error.NotLocked:

if the device is already unlocked

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLuks:

if the device is not LUKS encrypted

org.freedesktop.DeviceKit.Disks.Error.NotUnlocked:

if the device is not unlocked

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.luks-lock-others: To lock an encrypted LUKS non-system-internal device unlocked by another user
  • org.freedesktop.devicekit.disks.luks-lock-others-system-internal: To lock an encrypted LUKS system-internal 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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLuks:

if the device is not LUKS encrypted

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLinuxMd:

device to add component to is not a Linux md RAID array

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

given component doesn't exist

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices where all components are non-system-internal.
  • org.freedesktop.devicekit.disks.linux-md-system-internal: Needed to configured Linux md Software RAID devices with one or more system-internal components.


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 erased according to the erase= option.

component:

The component to remove from the array.

options:

Supports the erase= option for erasing the contents of the device.

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLinuxMd:

device to remove component from is not a Linux md RAID array

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

given component is not part of the array

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices where all components are non-system-internal.
  • org.freedesktop.devicekit.disks.linux-md-system-internal: Needed to configured Linux md Software RAID devices with one or more system-internal components.


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.Busy:

component to add is busy

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

if incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotLinuxMd:

device is not a Linux md RAID array

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.linux-md: Needed to configured Linux md Software RAID devices where all components are non-system-internal.
  • org.freedesktop.devicekit.disks.linux-md-system-internal: Needed to configured Linux md Software RAID devices with one or more system-internal components.


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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotDrive:

device is not a drive

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.drive-eject: To eject media from a non-system-internal device
  • org.freedesktop.devicekit.disks.drive-eject-system-internal: To eject a media from a system-internal device


DriveSmartRefreshData ()

DriveSmartRefreshData (in  'as' options)

Refreshes the S.M.A.R.T. 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=/path/to/smartctl-output can be passed to read the given file instead of invoking smartctl(8) tool. 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.Busy:

component to add is busy

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

if incoming parameters are invalid or an unknown error occured

org.freedesktop.DeviceKit.Disks.Error.NotSmartCapable:

device is not S.M.A.R.T. capable

org.freedesktop.DeviceKit.Disks.Error.NotDrive:

device is not a drive

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-smart-refresh: Needed to refresh S.M.A.R.T. data


DriveSmartGetHistoricalData ()

DriveSmartGetHistoricalData (in  't'                  since,
                             in  't'                  until,
                             out 'a(tdtsba(isiiiis))' data)

Retrieves historical S.M.A.R.T. data from the drive in the given time interval. Note that this is data collected and stored by the host as S.M.A.R.T. capable drives doesn't store or return historical data.

since:

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

until:

Don't fetch S.M.A.R.T. 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.

data:

An array of historical S.M.A.R.T. data. Each element contains the following members:

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotSmartCapable:

device is not S.M.A.R.T. capable

org.freedesktop.DeviceKit.Disks.Error.NotDrive:

device is not a drive

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-smart-retrieve-historical-data: To retrieve historical S.M.A.R.T. data


DriveSmartInitiateSelftest ()

DriveSmartInitiateSelftest (in  's' test,
                            in  'b' captive)

Runs a S.M.A.R.T. self test on the drive. TODO: need to figure out whether we need a return code.

test:

The name of the test to run; supported values are 'short' (usually less than ten minutes) and 'long' (usually tens of minutes) and 'conveyance' (usually a few minutes). See the smartctl(1) man page for details.

captive:

If TRUE then the drive will block access to the drive for the duration of the test. The method will error out if the drive is busy, e.g. if partitions are mounted.

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 incoming parameters are invalid or an unknown error occured

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

if the job was cancelled

org.freedesktop.DeviceKit.Disks.Error.NotSmartCapable:

device is not S.M.A.R.T. capable

org.freedesktop.DeviceKit.Disks.Error.NotDrive:

device is not a drive

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.devicekit.disks.drive-smart-selftest: Needed to run S.M.A.R.T. 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,
            'i' job-num-tasks,
            'i' job-cur-task,
            's' job-cur-task-id,
            'd' job-cur-task-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-num-tasks:

Number of tasks in the job.

job-cur-task:

Current task number (zero-based offset).

job-cur-task-id:

Task identifier for current task.

job-cur-task-percentage:

Percentage completed of current task (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-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-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-path" property

'device-mount-path'  read      's'

Where 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-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-busy" property

'device-is-busy'  read      'b'

TRUE if device is currently busy. Is set if the device is in use; this can hapen, for example, if the device is mounted, if another block device is claiming it (e.g. a RAID drive) or if a job initiated from DeviceKit-disks is pending.


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 "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. A job may be split into several sequential tasks; in that case job-num-tasks will be greater than one.


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. 'Erase', '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-num-tasks" property

'job-num-tasks'  read      'i'

Number of tasks in the job..


The "job-cur-task" property

'job-cur-task'  read      'i'

Current task number (zero-based offset).


The "job-cur-task-id" property

'job-cur-task-id'  read      's'

Task identifier for current task. TODO: enumerate task id's.


The "job-cur-task-percentage" property

'job-cur-task-percentage'  read      'd'

Percentage completed of current task (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-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 "partition-table-max-number" property

'partition-table-max-number'  read      'i'

The maximum value for partition-number of the enclosed partitions (partitions may not be sequentially numbered). This property is only valid if device-is-partition-table is TRUE.


The "partition-table-offsets" property

'partition-table-offsets'  read      'at'

An array of size partition-table-max-number that contains the offsets (in bytes) of each partition. The property partition-number on enclosed partitions can be used as an index in this array. This property is only valid if device-is-partition-table is TRUE.


The "partition-table-sizes" property

'partition-table-sizes'  read      'at'

An array of size partition-table-max-number that contains the size (in bytes) of each partition. The property partition-number on enclosed partitions can be used as an index in this array. 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

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 drives). For devices, like iPod's, that require an eject ioctl to be sent in order to be safely removed, use the drive-requires-eject property instead. This property is only valid if device-is-drive is TRUE.


The "drive-requires-eject" property

'drive-requires-eject'  read      'b'

TRUE only if the drive requires an eject ioctl to be safely removed; typically this includes multimedia devices like the iPod. If media can be physically ejected from the drive, use the drive-is-media-ejectable property instead. This property is only valid if device-is-drive is TRUE.


The "optical-disc-is-recordable" property

'optical-disc-is-recordable'  read      'b'

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


The "optical-disc-is-rewritable" property

'optical-disc-is-rewritable'  read      'b'

TRUE only if the disc is rewritable. This property is only valid if device-is-optical-disc 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-has-audio" property

'optical-disc-has-audio'  read      'b'

TRUE only if the disc contains audio tracks. 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-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-smart-is-capable" property

'drive-smart-is-capable'  read      'b'

TRUE only if drive is S.M.A.R.T. capable.


The "drive-smart-is-enabled" property

'drive-smart-is-enabled'  read      'b'

TRUE only if S.M.A.R.T. is enabled for the drive. This property is only valid if drive-smart-time-collected is greater than zero.


The "drive-smart-time-collected" property

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

The point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC) when the S.M.A.R.T. data was collected. If data was never collected, this property will assume the value 0. This property is only valid if drive-smart-is-capable is TRUE.


The "drive-smart-is-failing" property

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

TRUE only if the drive is assessed to be failing. This property is only valid if drive-smart-time-collected is greater than zero.


The "drive-smart-temperature" property

'drive-smart-temperature'  read      'd'

Temperature of the drive, in degrees celcius. This property is only valid if drive-smart-time-collected is greater than zero.


The "drive-smart-time-powered-on" property

'drive-smart-time-powered-on'  read      't'

Number of seconds the drive has been powered on. This property is only valid if drive-smart-time-collected is greater than zero.


The "drive-smart-last-self-test-result" property

'drive-smart-last-self-test-result'  read      's'

The result of the last self-test. The following values are known:

  • completed_ok: Completed without error or never run
  • not_completed_aborted: Aborted
  • not_completed_aborted_reset: Aborted by host
  • not_completed_unknown_reason: Aborted for unknown reason
  • completed_failed_unknown_reason: Completed, with failure:
  • completed_failed_electrical: Completed, with failure: electrical subsystem
  • completed_failed_servo: Completed, with failure: servo/seek subsystem
  • completed_failed_read: Completed, with failure: read failure
  • completed_failed_damage: Completed, with failure: handling damage
  • unknown: Unknown test result

This property is only valid if drive-smart-time-collected is greater than zero.


The "drive-smart-attributes" property

'drive-smart-attributes'  read      'a(isiiiis)'

An array of S.M.A.R.T. attributes. Each element contains the following members

  • attribute id: the identifier of the attribute
  • attribute name: a human readable name of the attribute or blank
  • flags: Flags (TODO: link to spec)
  • value: The normalized value of the attribute
  • worst: The worst value seen
  • threshold: The threshold of the attribute
  • raw: The raw vendor specific value of the attribute

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-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-update-time" property

'linux-md-component-update-time'  read      't'

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


The "linux-md-component-events" property

'linux-md-component-events'  read      't'

The events counter in the superblock of the component. This property is only valid if device-is-linux-md-component 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-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-slaves-state" property

'linux-md-slaves-state'  read      'as'

Records the state of each component in the array linux-md-slaves. Valid values include

  • in_sync: Component is an active part of the array
  • sync_in_progress: Component is currently being synced with the array
  • spare: Component is a hot spare

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.