org.freedesktop.UDisks.Device

org.freedesktop.UDisks.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)
LinuxMdAddSpare(in'o'component,
in'as'options)
LinuxMdExpand(in'ao'components,
in'as'options)
LinuxMdRemoveComponent(in'o'component,
in'as'options)
LinuxMdStop(in'as'options)
LinuxLvm2LVStop(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)
DriveSetSpindownTimeout(in'i'timeout_seconds,
in'as'options,
out's'cookie)
DriveUnsetSpindownTimeout(in's'cookie)
DriveAtaSmartRefreshData(in'as'options)
DriveAtaSmartInitiateSelftest(in's'test,
in'as'options)
DriveBenchmark(in'b'do_write_benchmark,
in'as'options,
out'a(td)'read_transfer_rate_results,
out'a(td)'write_transfer_rate_results,
out'a(td)'access_time_results)

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.UDisks.Device also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Properties

'NativePath'read's'
'DeviceDetectionTime'read't'
'DeviceMediaDetectionTime'read't'
'DeviceMajor'read'x'
'DeviceMinor'read'x'
'DeviceFile'read's'
'DeviceFilePresentation'read's'
'DeviceFileById'read'as'
'DeviceFileByPath'read'as'
'DeviceIsSystemInternal'read'b'
'DeviceIsPartition'read'b'
'DeviceIsPartitionTable'read'b'
'DeviceIsRemovable'read'b'
'DeviceIsMediaAvailable'read'b'
'DeviceIsMediaChangeDetected'read'b'
'DeviceIsMediaChangeDetectionPolling'read'b'
'DeviceIsMediaChangeDetectionInhibitable'read'b'
'DeviceIsMediaChangeDetectionInhibited'read'b'
'DeviceIsReadOnly'read'b'
'DeviceIsDrive'read'b'
'DeviceIsOpticalDisc'read'b'
'DeviceIsMounted'read'b'
'DeviceMountPaths'read'as'
'DeviceMountedByUid'read'u'
'DeviceIsLuks'read'b'
'DeviceIsLuksCleartext'read'b'
'DeviceIsLinuxMdComponent'read'b'
'DeviceIsLinuxMd'read'b'
'DeviceIsLinuxLvm2LV'read'b'
'DeviceIsLinuxLvm2PV'read'b'
'DeviceIsLinuxDmmpComponent'read'b'
'DeviceIsLinuxDmmp'read'b'
'DeviceIsLinuxLoop'read'b'
'DeviceSize'read't'
'DeviceBlockSize'read't'
'DevicePresentationHide'read'b'
'DevicePresentationNopolicy'read'b'
'DevicePresentationName'read's'
'DevicePresentationIconName'read's'
'DeviceAutomountHint'read's'
'JobInProgress'read'b'
'JobId'read's'
'JobInitiatedByUid'read'u'
'JobIsCancellable'read'b'
'JobPercentage'read'd'
'IdUsage'read's'
'IdType'read's'
'IdVersion'read's'
'IdUuid'read's'
'IdLabel'read's'
'LuksHolder'read'o'
'LuksCleartextSlave'read'o'
'LuksCleartextUnlockedByUid'read'u'
'PartitionSlave'read'o'
'PartitionScheme'read's'
'PartitionType'read's'
'PartitionLabel'read's'
'PartitionUuid'read's'
'PartitionFlags'read'as'
'PartitionNumber'read'i'
'PartitionOffset'read't'
'PartitionSize'read't'
'PartitionAlignmentOffset'read't'
'PartitionTableScheme'read's'
'PartitionTableCount'read'i'
'DriveVendor'read's'
'DriveModel'read's'
'DriveRevision'read's'
'DriveSerial'read's'
'DriveWwn'read's'
'DriveRotationRate'read'u'
'DriveWriteCache'read's'
'DriveConnectionInterface'read's'
'DriveConnectionSpeed'read't'
'DriveMediaCompatibility'read'as'
'DriveMedia'read's'
'DriveIsMediaEjectable'read'b'
'DriveCanDetach'read'b'
'DriveCanSpindown'read'b'
'DriveIsRotational'read'b'
'DriveAdapter'read'o'
'DrivePorts'read'ao'
'DriveSimilarDevices'read'ao'
'OpticalDiscIsBlank'read'b'
'OpticalDiscIsAppendable'read'b'
'OpticalDiscIsClosed'read'b'
'OpticalDiscNumTracks'read'u'
'OpticalDiscNumAudioTracks'read'u'
'OpticalDiscNumSessions'read'u'
'DriveAtaSmartIsAvailable'read'b'
'DriveAtaSmartTimeCollected'read't'
'DriveAtaSmartStatus'read's'
'DriveAtaSmartBlob'read'ay'
'LinuxMdComponentLevel'read's'
'LinuxMdComponentPosition'read'i'
'LinuxMdComponentNumRaidDevices'read'i'
'LinuxMdComponentUuid'read's'
'LinuxMdComponentName'read's'
'LinuxMdComponentHomeHost'read's'
'LinuxMdComponentVersion'read's'
'LinuxMdComponentHolder'read'o'
'LinuxMdComponentState'read'as'
'LinuxMdState'read's'
'LinuxMdLevel'read's'
'LinuxMdUuid'read's'
'LinuxMdHomeHost'read's'
'LinuxMdName'read's'
'LinuxMdNumRaidDevices'read'i'
'LinuxMdVersion'read's'
'LinuxMdSlaves'read'ao'
'LinuxMdIsDegraded'read'b'
'LinuxMdSyncAction'read's'
'LinuxMdSyncPercentage'read'd'
'LinuxMdSyncSpeed'read't'
'LinuxLvm2PVUuid'read's'
'LinuxLvm2PVNumMetadataAreas'read'u'
'LinuxLvm2PVGroupName'read's'
'LinuxLvm2PVGroupUuid'read's'
'LinuxLvm2PVGroupSize'read't'
'LinuxLvm2PVGroupUnallocatedSize'read't'
'LinuxLvm2PVGroupSequenceNumber'read't'
'LinuxLvm2PVGroupExtentSize'read't'
'LinuxLvm2PVGroupPhysicalVolumes'read'as'
'LinuxLvm2PVGroupLogicalVolumes'read'as'
'LinuxLvm2LVName'read's'
'LinuxLvm2LVUuid'read's'
'LinuxLvm2LVGroupName'read's'
'LinuxLvm2LVGroupUuid'read's'
'LinuxDmmpComponentHolder'read'o'
'LinuxDmmpName'read's'
'LinuxDmmpSlaves'read'ao'
'LinuxDmmpParameters'read's'
'LinuxLoopFilename'read's'

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. DriveMediaCompatibility) and export both general and specific properties (such as IdUsage vs. IdType). 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.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device or a partition on it are busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the enclosing partition table device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.FilesystemToolsMissing:

if mkfs for this type is not available

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

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

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.FilesystemToolsMissing:

if the label changing tool for this file system type is not available

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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. The option auth_no_user_interaction can be used to avoid user interaction (e.g. authentication dialogs) when checking whether the caller is authorized.

mount_path:

Where the device was mounted.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.InvalidOption:

if an invalid or malformed mount option was given

org.freedesktop.PolicyKit.Error.FilesystemDriverMissing:

if the kernel driver for this file system type is not available

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.filesystem-mount: If the operation is on a non-system-internal device
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.InvalidOption:

if an invalid or malformed unmount option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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.PolicyKit.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.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.filesystem-check: To check a file system on a non-system-internal device.
  • org.freedesktop.udisks.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.PolicyKit.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.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.filesystem-lsof: To check a file system on a non-system-internal device.
  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

if the device is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

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


LinuxMdAddSpare ()

LinuxMdAddSpare (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.PolicyKit.Error.Busy:

component to add is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

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


LinuxMdExpand ()

LinuxMdExpand (in'ao'components,
in'as'options)

Grows the Linux md RAID array with the given components.

components:

Object paths of the components to use for growing the array

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

component to add is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.udisks.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.PolicyKit.Error.Busy:

component to add is busy

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.udisks.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.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

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


LinuxLvm2LVStop ()

LinuxLvm2LVStop (in'as'options)

Stops a Linux LVM2 Logical Volume.

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.udisks.linux-lvm2: Needed to configured Linux LVM2.


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 LinuxMdSyncAction 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.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need the following PolicyKit authorization:

  • org.freedesktop.udisks.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.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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.PolicyKit.Error.Failed:

if the given cookie is malformed

DrivePollMedia ()

DrivePollMedia ()

Polls the drive for media. This is typically only useful when the DeviceIsMediaChangeDetected property is FALSE.

Errors

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.inhibit-polling: To inhibit polling


DriveEject ()

DriveEject (in'as'options)

Ejects media from the device. If the unmount option is given, the device might have mounted file systems, which will be unmounted before ejection.

options:

Eject options. Valid options currently include only 'unmount'.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

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

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.InvalidOption:

if an invalid or malformed option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.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 DriveCanDetach property before attempting to invoke this method.

Note that the physical port a drive belongs to may be located inside the physical casing - for example, some netbooks provide a SD card drive connect through USB. As such, users of this method should be careful – don't automatically invoke this method if the user presses e.g. an Eject button in the UI. Instead, provide e.g. a "Safely Remove Drive" option.

options:

Detach options. Currently no options are recognized.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

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

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

org.freedesktop.PolicyKit.Error.InvalidOption:

if an invalid or malformed option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.drive-detach: To detach a device


DriveSetSpindownTimeout ()

DriveSetSpindownTimeout (in'i'timeout_seconds,
in'as'options,
out's'cookie)

Configures spindown timeout for the drive. Check the DriveCanSpindown property before attempting to invoke this method. Caution should be exercised when using this method, see the SPINNING DOWN DISKS section in the udisks(1) man page before using it.

timeout_seconds:

Number of seconds before the drive should be spun down.

options:

Options related to setting spindown timeout. Currently no options are recognized.

cookie:

A cookie that can be used in the DriveUnsetSpindownTimeout() method to unset the spindown timeout of the device.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.InvalidOption:

if an invalid or malformed option was given

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.drive-set-spindown: To set spindown timeouts


DriveUnsetSpindownTimeout ()

DriveUnsetSpindownTimeout (in's'cookie)

Unsets spindown timeout for the drive.

cookie:

A cookie obtained from the DriveSetSpindownTimeout() method.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.drive-set-spindown: To set spindown timeouts


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.PolicyKit.Error.AtaSmartWouldWakeup:

If the disk is sleeping and the nowakeup option was passed

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.drive-ata-smart-refresh: Needed to refresh 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.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

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


DriveBenchmark ()

DriveBenchmark (in'b'do_write_benchmark,
in'as'options,
out'a(td)'read_transfer_rate_results,
out'a(td)'write_transfer_rate_results,
out'a(td)'access_time_results)

Benchmarks the drive.

do_write_benchmark:

If TRUE, write performance will be benchmarked in addition to read performance. Note that benchmarking write performance will scribble zeros in various parts of the drive and can only be used on a drive where the contents are completely unrecognized (e.g. no partition table and device). Use this option with caution.

options:

Currently unused.

read_transfer_rate_results:

An array of pairs where the first element is the offset and the second element is the measured read transfer rate (in bytes/sec) at the given offset.

write_transfer_rate_results:

An array of pairs where the first element is the offset and the second element is the measured read transfer rate (in bytes/sec) at the given offset. This is an empty array unless write benchmarking has been requested.

access_time_results:

An array of pairs where the first element is the offset and the second element the amount of time (in seconds) it took to seek to the position.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Failed:

if the operation failed

org.freedesktop.PolicyKit.Error.Cancelled:

if the job was cancelled

Permissions

The caller will need one of the following PolicyKit authorizations:

  • org.freedesktop.udisks.change: Needed to run benchmarks

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 "NativePath" property

'NativePath'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 "DeviceDetectionTime" property

'DeviceDetectionTime'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 "DeviceMediaDetectionTime" property

'DeviceMediaDetectionTime'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 "DeviceMajor" property

'DeviceMajor'read'x'

Major for the device or -1 if not set.


The "DeviceMinor" property

'DeviceMinor'read'x'

Major for the device or -1 if not set.


The "DeviceFile" property

'DeviceFile'read's'

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


The "DeviceFilePresentation" property

'DeviceFilePresentation'read's'

Either the value of the DeviceFile property, otherwise the preferred device file (typically a symlink to the value of the DeviceFile property) to present in user interface. Example: /dev/mapper/mpathb or /dev/vg_phobos/lv_root.


The "DeviceFileById" property

'DeviceFileById'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 "DeviceFileByPath" property

'DeviceFileByPath'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 "DeviceIsSystemInternal" property

'DeviceIsSystemInternal'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 "DeviceIsPartition" property

'DeviceIsPartition'read'b'

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


The "DeviceIsPartitionTable" property

'DeviceIsPartitionTable'read'b'

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


The "DeviceIsRemovable" property

'DeviceIsRemovable'read'b'

TRUE if the device contains removable media.


The "DeviceIsMediaAvailable" property

'DeviceIsMediaAvailable'read'b'

TRUE if media is available in the device.


The "DeviceIsMediaChangeDetected" property

'DeviceIsMediaChangeDetected'read'b'

TRUE if media changes are detected.


The "DeviceIsMediaChangeDetectionPolling" property

'DeviceIsMediaChangeDetectionPolling'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 "DeviceIsMediaChangeDetectionInhibitable" property

'DeviceIsMediaChangeDetectionInhibitable'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 "DeviceIsMediaChangeDetectionInhibited" property

'DeviceIsMediaChangeDetectionInhibited'read'b'

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


The "DeviceIsReadOnly" property

'DeviceIsReadOnly'read'b'

TRUE if the device read-only.


The "DeviceIsDrive" property

'DeviceIsDrive'read'b'

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


The "DeviceIsOpticalDisc" property

'DeviceIsOpticalDisc'read'b'

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


The "DeviceIsMounted" property

'DeviceIsMounted'read'b'

TRUE if the device is mounted.


The "DeviceMountPaths" property

'DeviceMountPaths'read'as'

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


The "DeviceMountedByUid" property

'DeviceMountedByUid'read'u'

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


The "DeviceIsLuks" property

'DeviceIsLuks'read'b'

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


The "DeviceIsLuksCleartext" property

'DeviceIsLuksCleartext'read'b'

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


The "DeviceIsLinuxMdComponent" property

'DeviceIsLinuxMdComponent'read'b'

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


The "DeviceIsLinuxMd" property

'DeviceIsLinuxMd'read'b'

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


The "DeviceIsLinuxLvm2LV" property

'DeviceIsLinuxLvm2LV'read'b'

TRUE if the device is a Linux LVM2 logical volume. See LinuxLvm2LV properties for details.


The "DeviceIsLinuxLvm2PV" property

'DeviceIsLinuxLvm2PV'read'b'

TRUE if the device is a Linux LVM2 physical. See LinuxLvm2PV properties for details.


The "DeviceIsLinuxDmmpComponent" property

'DeviceIsLinuxDmmpComponent'read'b'

TRUE if the device is a component (e.g. active path) of a Linux dm-multipath device.


The "DeviceIsLinuxDmmp" property

'DeviceIsLinuxDmmp'read'b'

TRUE if the device is a Linux dm-multipath device.


The "DeviceIsLinuxLoop" property

'DeviceIsLinuxLoop'read'b'

TRUE if the device is a Linux loop device.


The "DeviceSize" property

'DeviceSize'read't'

The size of the device in bytes.


The "DeviceBlockSize" property

'DeviceBlockSize'read't'

The block size of the device in bytes.


The "DevicePresentationHide" property

'DevicePresentationHide'read'b'

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


The "DevicePresentationNopolicy" property

'DevicePresentationNopolicy'read'b'

A hint if the device (or e.g. the multi-disk device that the device is part of) shouldn't be automatically mounted / assembled.


The "DevicePresentationName" property

'DevicePresentationName'read's'

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


The "DevicePresentationIconName" property

'DevicePresentationIconName'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 "DeviceAutomountHint" property

'DeviceAutomountHint'read's'

A hint to the desktop that indicates if a device should be automounted. Possible values are:

  • always: Device should always be auto-mounted.
  • never: Device should never be auto-mounted.

An empty string is interpreted to mean that there is no hint - the desktop auto-mounter should make its own decision of whether to auto-mount the device.


The "JobInProgress" property

'JobInProgress'read'b'

The job properties specify if a job initiated via the udisks daemon is currently in progress.


The "JobId" property

'JobId'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 "JobInitiatedByUid" property

'JobInitiatedByUid'read'u'

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


The "JobIsCancellable" property

'JobIsCancellable'read'b'

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


The "JobPercentage" property

'JobPercentage'read'd'

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


The "IdUsage" property

'IdUsage'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 "IdType" property

'IdType'read's'

This property contains more information about the result of probing the block device. It's value depends of the value the IdUsage 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 "IdVersion" property

'IdVersion'read's'

The version of the detected file system (or other identified data structure) identified by the IdUsage and IdType properties.


The "IdUuid" property

'IdUuid'read's'

The UUID (universally unique identifier) of the detected file system (or other identified data structure) identified by the IdUsage and IdType properties.


The "IdLabel" property

'IdLabel'read's'

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


The "LuksHolder" property

'LuksHolder'read'o'

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


The "LuksCleartextSlave" property

'LuksCleartextSlave'read'o'

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


The "LuksCleartextUnlockedByUid" property

'LuksCleartextUnlockedByUid'read'u'

The UNIX user id of the user who unlocked the LUKS device. Set to 0 if not unlocked by udisks. This property is only valid if DeviceIsLuksCleartext is TRUE.


The "PartitionSlave" property

'PartitionSlave'read'o'

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


The "PartitionScheme" property

'PartitionScheme'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 DeviceIsPartition is TRUE.


The "PartitionType" property

'PartitionType'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 DeviceIsPartition is TRUE.


The "PartitionLabel" property

'PartitionLabel'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 DeviceIsPartition is TRUE.


The "PartitionUuid" property

'PartitionUuid'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 DeviceIsPartition is TRUE.


The "PartitionFlags" property

'PartitionFlags'read'as'

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


The "PartitionNumber" property

'PartitionNumber'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 DeviceIsPartition is TRUE.


The "PartitionOffset" property

'PartitionOffset'read't'

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


The "PartitionSize" property

'PartitionSize'read't'

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


The "PartitionAlignmentOffset" property

'PartitionAlignmentOffset'read't'

The amount of bytes the beginning of the partition is offset from the disk's natural alignment. This property is only valid if DeviceIsPartition is TRUE.


The "PartitionTableScheme" property

'PartitionTableScheme'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 DeviceIsPartitionTable is TRUE.


The "PartitionTableCount" property

'PartitionTableCount'read'i'

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


The "DriveVendor" property

'DriveVendor'read's'

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


The "DriveModel" property

'DriveModel'read's'

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


The "DriveRevision" property

'DriveRevision'read's'

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


The "DriveSerial" property

'DriveSerial'read's'

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


The "DriveWwn" property

'DriveWwn'read's'

The World Wide Name in hex (without a leading "0x") or blank if the drive has no WWN. Example: 50014ee0016eb572. This property is only valid if DeviceIsDrive is TRUE.


The "DriveRotationRate" property

'DriveRotationRate'read'u'

The rotational rate of the disk (e.g. 4200, 5400, 5900, 7200, 10000, 15000) in rounds per minute or 0 if unknown. This property is only valid if DeviceIsDrive is TRUE and DriveIsRotational is TRUE.


The "DriveWriteCache" property

'DriveWriteCache'read's'

Whether the write cache is enabled, known values include "enabled" and "disabled" and the blank string if unknown. This property is only valid if DeviceIsDrive is TRUE.


The "DriveConnectionInterface" property

'DriveConnectionInterface'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 DeviceIsDrive is TRUE.


The "DriveConnectionSpeed" property

'DriveConnectionSpeed'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 DeviceIsDrive is TRUE.


The "DriveMediaCompatibility" property

'DriveMediaCompatibility'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 DeviceIsDrive is TRUE.


The "DriveMedia" property

'DriveMedia'read's'

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


The "DriveIsMediaEjectable" property

'DriveIsMediaEjectable'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 DeviceIsDrive is TRUE.


The "DriveCanDetach" property

'DriveCanDetach'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 DeviceIsDrive is TRUE.


The "DriveCanSpindown" property

'DriveCanSpindown'read'b'

TRUE only if the drive is capable of being put into a standby mode (typically powering down the spindle motor). This property is only valid if DeviceIsDrive is TRUE.


The "DriveIsRotational" property

'DriveIsRotational'read'b'

TRUE if the disk uses rotational media, such as a hard disk. This property is only valid if DeviceIsDrive is TRUE.


The "DriveAdapter" property

'DriveAdapter'read'o'

The object of the storage adapter for the drive or "/" if no adapter exists. This property is only valid if DeviceIsDrive is TRUE.


The "DrivePorts" property

'DrivePorts'read'ao'

The object paths of the ports for the drive or empty if no ports exist. This property is only valid if DeviceIsDrive is TRUE.


The "DriveSimilarDevices" property

'DriveSimilarDevices'read'ao'

An array of object paths for devices with similar serial number and/or WWN. Typically all drives with similar serial number and/or WWN are configured as a multipath device (for example via the Linux device-mapper target cf. DeviceIsLinuxDmmp and DeviceIsLinuxDmmpComponent) but in some cases the OS needs manual configuration. Presentation-level software can (and should) display a warning when this property is non-empty and the device isn't a multipath component or multipath device e.g. when both DeviceIsLinuxDmmpComponent) and DeviceIsLinuxDmmp) is FALSE. This property is only valid if DeviceIsDrive is TRUE.


The "OpticalDiscIsBlank" property

'OpticalDiscIsBlank'read'b'

TRUE only if the disc is appendable. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "OpticalDiscIsAppendable" property

'OpticalDiscIsAppendable'read'b'

TRUE only if the disc is appendable. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "OpticalDiscIsClosed" property

'OpticalDiscIsClosed'read'b'

TRUE only if the disc is appendable. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "OpticalDiscNumTracks" property

'OpticalDiscNumTracks'read'u'

Number of tracks on the disc. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "OpticalDiscNumAudioTracks" property

'OpticalDiscNumAudioTracks'read'u'

Number of audio tracks on the disc. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "OpticalDiscNumSessions" property

'OpticalDiscNumSessions'read'u'

Number of sessions on the disc. This property is only valid if DeviceIsOpticalDisc is TRUE.


The "DriveAtaSmartIsAvailable" property

'DriveAtaSmartIsAvailable'read'b'

TRUE if the disk is capable of reporting SMART data, FALSE otherwise.


The "DriveAtaSmartTimeCollected" property

'DriveAtaSmartTimeCollected'read't'

The point in time (seconds since the Epoch Jan 1, 1970 0:00 UTC) when ATA SMART data was collected. This property is only valid if DriveAtaSmartTimeCollected is greater than zero.


The "DriveAtaSmartStatus" property

'DriveAtaSmartStatus'read's'

The overall assessment for the disk. Is one of the following strings GOOD, BAD_ATTRIBUTES_IN_THE_PAST (At least one pre-fail attribute is exceeded its threshold in the past), BAD_SECTOR (At least one bad sector), BAD_ATTRIBUTE_NOW (At least one pre-fail attribute is exceeding its threshold now), BAD_SECTOR_MANY (Many bad sectors)), BAD_STATUS (Smart Self Assessment negative) or empty if some error occured trying to determine the result. This property is only valid if DriveAtaSmartTimeCollected is greater than zero.


The "DriveAtaSmartBlob" property

'DriveAtaSmartBlob'read'ay'

A blob containing the ATA SMART data. This blob can be used with libatasmart to get more information. This property is only valid if DriveAtaSmartTimeCollected is greater than zero.


The "LinuxMdComponentLevel" property

'LinuxMdComponentLevel'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
  • raid6: RAID-6
  • raid10: RAID-10

This property is only valid if DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentPosition" property

'LinuxMdComponentPosition'read'i'

The zero-based position of the component or -1 if not part of a running array. This property is only valid if DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentNumRaidDevices" property

'LinuxMdComponentNumRaidDevices'read'i'

The number of component devices in the array the component is part of. This property is only valid if DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentUuid" property

'LinuxMdComponentUuid'read's'

The UUID of the array the component is part of. This property is only valid if DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentName" property

'LinuxMdComponentName'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 DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentHomeHost" property

'LinuxMdComponentHomeHost'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 DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentVersion" property

'LinuxMdComponentVersion'read's'

The version of superblock of the component. This property is only valid if DeviceIsLinuxMdComponent is TRUE.


The "LinuxMdComponentHolder" property

'LinuxMdComponentHolder'read'o'

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


The "LinuxMdComponentState" property

'LinuxMdComponentState'read'as'

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


The "LinuxMdState" property

'LinuxMdState'read's'

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


The "LinuxMdLevel" property

'LinuxMdLevel'read's'

The RAID level of the array. For known values see the LinuxMdComponentLevel property. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdUuid" property

'LinuxMdUuid'read's'

The UUID of the array. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdHomeHost" property

'LinuxMdHomeHost'read's'

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


The "LinuxMdName" property

'LinuxMdName'read's'

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


The "LinuxMdNumRaidDevices" property

'LinuxMdNumRaidDevices'read'i'

Number of component devices in the array. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdVersion" property

'LinuxMdVersion'read's'

Metadata version used in the components. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdSlaves" property

'LinuxMdSlaves'read'ao'

An array of object paths for components currently part of the array. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdIsDegraded" property

'LinuxMdIsDegraded'read'b'

TRUE only if the array is running in degraded mode. This property is only valid if DeviceIsLinuxMd is TRUE.


The "LinuxMdSyncAction" property

'LinuxMdSyncAction'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 DeviceIsLinuxMd is TRUE.


The "LinuxMdSyncPercentage" property

'LinuxMdSyncPercentage'read'd'

The progress of the current sync operation. This property is only valid if DeviceIsLinuxMd is TRUE and the value of the property LinuxMdSyncAction is not idle.


The "LinuxMdSyncSpeed" property

'LinuxMdSyncSpeed'read't'

The speed of the sync operation in bytes per second. This property is only valid if DeviceIsLinuxMd is TRUE and the value of the property LinuxMdSyncAction is not idle.


The "LinuxLvm2PVUuid" property

'LinuxLvm2PVUuid'read's'

The UUID of the PV. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVNumMetadataAreas" property

'LinuxLvm2PVNumMetadataAreas'read'u'

The number of metadata areas on the PV. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupName" property

'LinuxLvm2PVGroupName'read's'

The name of the volume group (that this physical volume belongs to). This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupUuid" property

'LinuxLvm2PVGroupUuid'read's'

The UUID of the volume group (that this physical volume belongs to). This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupSize" property

'LinuxLvm2PVGroupSize'read't'

The size of the volume group (that this physical volume belongs to) in bytes. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupUnallocatedSize" property

'LinuxLvm2PVGroupUnallocatedSize'read't'

The unallocated size of the volume group (that this physical volume belongs to) in bytes. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupSequenceNumber" property

'LinuxLvm2PVGroupSequenceNumber'read't'

The sequence number for the volume group (that this physical volume belongs to). This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupExtentSize" property

'LinuxLvm2PVGroupExtentSize'read't'

The extent size for the volume group (that this physical volume belongs to) in bytes. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupPhysicalVolumes" property

'LinuxLvm2PVGroupPhysicalVolumes'read'as'

The physical volumes that belongs to the volume group (that this physical volume belongs to). Each element is a semicolon separated list of key/value pairs. The only known key/value type as this point is uuid for the UUID of the physical volume. This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2PVGroupLogicalVolumes" property

'LinuxLvm2PVGroupLogicalVolumes'read'as'

The logical volumes that belongs to the volume group (that this physical volume belongs to). Each element is a semicolon separated list of key/value pairs. The only known key/value types as this point are uuid (for the UUID of the logical volume), name (for the name of the logical volume), size (for the size of the logical volume) and active (whether the logical volume is active). This property is only valid if DeviceIsLinuxLvm2PV is TRUE.


The "LinuxLvm2LVName" property

'LinuxLvm2LVName'read's'

The name of the logical volume. This property is only valid if DeviceIsLinuxLvm2LV is TRUE.


The "LinuxLvm2LVUuid" property

'LinuxLvm2LVUuid'read's'

The UUID of the logical volume. This property is only valid if DeviceIsLinuxLvm2LV is TRUE.


The "LinuxLvm2LVGroupName" property

'LinuxLvm2LVGroupName'read's'

The name of volume group the logical volume belongs to. This property is only valid if DeviceIsLinuxLvm2LV is TRUE.


The "LinuxLvm2LVGroupUuid" property

'LinuxLvm2LVGroupUuid'read's'

The UUID of the volume group the logical volume belongs to. This property is only valid if DeviceIsLinuxLvm2LV is TRUE.


The "LinuxDmmpComponentHolder" property

'LinuxDmmpComponentHolder'read'o'

The object path of the multi-path device the component is currently part of. This property is only valid if DeviceIsLinuxDmmpComponent is TRUE.


The "LinuxDmmpName" property

'LinuxDmmpName'read's'

The symbolic name for the multipath device, e.g. mpathb. This property is only valid if DeviceIsLinuxDmmp is TRUE.


The "LinuxDmmpSlaves" property

'LinuxDmmpSlaves'read'ao'

The object paths of currently active component devices, e.g. paths. This property is only valid if DeviceIsLinuxDmmp is TRUE.


The "LinuxDmmpParameters" property

'LinuxDmmpParameters'read's'

The parameters/configuration for the multipath device. This property is only valid if DeviceIsLinuxDmmp is TRUE.


The "LinuxLoopFilename" property

'LinuxLoopFilename'read's'

The file backing the loop device. This property is only valid if DeviceIsLinuxLoop is TRUE.