org.freedesktop.DeviceKit.Disks

org.freedesktop.DeviceKit.Disks — Disks interface

Methods

EnumerateDevices       (out 'ao' devices)
FindDeviceByDeviceFile (in  's'  device_file,
                        out 'o'  device)
LinuxMdStart           (in  'ao' components,
                        in  'as' options,
                        out 'o'  device)

Signals

DeviceAdded      ('o' device)
DeviceRemoved    ('o' device)
DeviceChanged    ('o' device)
DeviceJobChanged ('o' device,
                  'b' job-in-progress,
                  'b' job-is-cancellable,
                  's' job-id,
                  '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 also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Properties

'daemon-version'        read      's'
'supports-luks-devices' read      'b'
'known-filesystems'     read      'a(ssbbbubbbbbbbb)'

Description

Details

EnumerateDevices ()

EnumerateDevices (out 'ao' devices)

Enumerate all disks on the system.

devices:

An array of object paths for devices.

FindDeviceByDeviceFile ()

FindDeviceByDeviceFile (in  's' device_file,
                        out 'o' device)

Finds a device by device path.

device_file:

UNIX special device file

device:

Object path of device

LinuxMdStart ()

LinuxMdStart (in  'ao' components,
              in  'as' options,
              out 'o'  device)

Starts an Linux md RAID array. The array will be assembled and started in degraded mode if an insufficient number of components are given.

components:

The object paths of the components of the array to start.

options:

Options for starting the array. Currently no options are supported.

device:

The object path of the assembled array device.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

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

if one of the given components 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

org.freedesktop.DeviceKit.Disks.Error.NotLinuxMdComponent:

one of the given components doesn't exist or is not a Linux md component

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.

Signal Details

The DeviceAdded signal

DeviceAdded ('o' device)

Emitted when a device is added.

device:

Object path of device that was added.

The DeviceRemoved signal

DeviceRemoved ('o' device)

Emitted when a device is removed.

device:

Object path of device that was removed.

The DeviceChanged signal

DeviceChanged ('o' device)

Emitted when a device changed.

device:

Object path of device that was changed.

The DeviceJobChanged signal

DeviceJobChanged ('o' device,
                  'b' job-in-progress,
                  'b' job-is-cancellable,
                  's' job-id,
                  '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.

device:

The object path of the device.

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-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 "daemon-version" property

'daemon-version'  read      's'

The version of the running daemon.


The "supports-luks-devices" property

'supports-luks-devices'  read      'b'

TRUE only if the daemon can create encrypted LUKS block devices, see the LuksUnlock() and LuksLock() methods for details.


The "known-filesystems" property

'known-filesystems'  read      'a(ssbbbubbbbbbbb)'

An array of file systems known to the daemon and what features are supported. Each element in the array contains the following members:

  • id: The name / identifier of the file system (such as ext3 or vfat), similar to the contents of the Device:id-type property.
  • name: A human readable name for the file system such as "Linux Ext3".
  • supports_unix_owners: Whether the file system supports the UNIX owners model (e.g. ext3 does, but vfat doesn't).
  • can_mount: Whether the file system can be mounted.
  • can_create: Whether the file system can be created on a device.
  • max_label_len: The maximum amount of bytes that the file system label can hold. Set to zero if the file system doesn't support labels.
  • supports_label_rename: Whether the label of the file system can be changed.
  • supports_online_label_rename: Whether the label can be changed while the file system is mounted.
  • supports_fsck: Whether the file system can be checked.
  • supports_online_fsck: Whether the file system can be checked while mounted.
  • supports_resize_enlarge: Whether the file system can be enlarged.
  • supports_online_resize_enlarge: Whether the file system can be enlarged while mounted.
  • supports_resize_shrink: Whether the file system can be shrunk.
  • supports_online_resize_shrink: Whether the file system can be shrunk while mounted.