org.freedesktop.UDisks

org.freedesktop.UDisks — UDisks interface

Methods

EnumerateAdapters             (out 'ao' devices)
EnumerateExpanders            (out 'ao' devices)
EnumeratePorts                (out 'ao' devices)
EnumerateDevices              (out 'ao' devices)
EnumerateDeviceFiles          (out 'as' device_files)
FindDeviceByDeviceFile        (in  's'  device_file,
                               out 'o'  device)
FindDeviceByMajorMinor        (in  'x'  device_major,
                               in  'x'  device_minor,
                               out 'o'  device)
DriveInhibitAllPolling        (in  'as' options,
                               out 's'  cookie)
DriveUninhibitAllPolling      (in  's'  cookie)
DriveSetAllSpindownTimeouts   (in  'i'  timeout_seconds,
                               in  'as' options,
                               out 's'  cookie)
DriveUnsetAllSpindownTimeouts (in  's'  cookie)
LinuxLvm2VGStart              (in  's'  uuid,
                               in  'as' options)
LinuxLvm2VGStop               (in  's'  uuid,
                               in  'as' options)
LinuxLvm2VGSetName            (in  's'  uuid,
                               in  's'  name)
LinuxLvm2VGAddPV              (in  's'  uuid,
                               in  'o'  physical_volume,
                               in  'as' options)
LinuxLvm2VGRemovePV           (in  's'  vg_uuid,
                               in  's'  pv_uuid,
                               in  'as' options)
LinuxLvm2LVSetName            (in  's'  group_uuid,
                               in  's'  uuid,
                               in  's'  name)
LinuxLvm2LVStart              (in  's'  group_uuid,
                               in  's'  uuid,
                               in  'as' options)
LinuxLvm2LVRemove             (in  's'  group_uuid,
                               in  's'  uuid,
                               in  'as' options)
LinuxLvm2LVCreate             (in  's'  group_uuid,
                               in  's'  name,
                               in  't'  size,
                               in  'u'  num_stripes,
                               in  't'  stripe_size,
                               in  'u'  num_mirrors,
                               in  'as' options,
                               in  's'  fstype,
                               in  'as' fsoptions,
                               out 'o'  created_device)
LinuxMdStart                  (in  'ao' components,
                               in  'as' options,
                               out 'o'  device)
LinuxMdCreate                 (in  'ao' components,
                               in  's'  level,
                               in  't'  stripe_size,
                               in  's'  name,
                               in  'as' options,
                               out 'o'  device)
Inhibit                       (out 's'  cookie)
Uninhibit                     (in  's'  cookie)

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)
AdapterAdded     ('o' adapter)
AdapterRemoved   ('o' adapter)
AdapterChanged   ('o' adapter)
ExpanderAdded    ('o' expander)
ExpanderRemoved  ('o' expander)
ExpanderChanged  ('o' expander)
PortAdded        ('o' port)
PortRemoved      ('o' port)
PortChanged      ('o' port)

Implemented Interfaces

Objects implementing org.freedesktop.UDisks also implements org.freedesktop.DBus.Introspectable, org.freedesktop.DBus.Properties

Properties

'DaemonVersion'       read      's'
'DaemonIsInhibited'   read      'b'
'SupportsLuksDevices' read      'b'
'KnownFilesystems'    read      'a(ssbbbubbbbbbbb)'

Description

Details

EnumerateAdapters ()

EnumerateAdapters (out 'ao' devices)

Enumerate all storage adapters on the system.

devices:

An array of object paths for storage adapters.

EnumerateExpanders ()

EnumerateExpanders (out 'ao' devices)

Enumerate all storage expanders on the system.

devices:

An array of object paths for storage expanders.

EnumeratePorts ()

EnumeratePorts (out 'ao' devices)

Enumerate all storage ports on the system.

devices:

An array of object paths for ports.

EnumerateDevices ()

EnumerateDevices (out 'ao' devices)

Enumerate all disk devices on the system.

devices:

An array of object paths for devices.

EnumerateDeviceFiles ()

EnumerateDeviceFiles (out 'as' device_files)

Enumerate all device files (including symlinks) for disk devices on the system.

device_files:

An array device file names.

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

FindDeviceByMajorMinor ()

FindDeviceByMajorMinor (in  'x' device_major,
                        in  'x' device_minor,
                        out 'o' device)

Finds a device by major:minor.

device_major:

Device major

device_minor:

Device minor

device:

Object path of device

DriveInhibitAllPolling ()

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

Inhibits the daemon from polling devices for media changes.

options:

Inhibit options. Currently no options are recognized.

cookie:

A cookie that can be used in the DriveUninhibitAllPolling() method to stop inhibiting polling of all devices.

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


DriveUninhibitAllPolling ()

DriveUninhibitAllPolling (in  's' cookie)

Uninhibits daemon from polling devices for media changes.

cookie:

A cookie obtained from the DriveInhibitAllPolling() method.

Errors

org.freedesktop.PolicyKit.Error.Failed:

if the given cookie is malformed

DriveSetAllSpindownTimeouts ()

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

Configures spindown timeout for all drives capable of being spun down. 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 drives should be spun down.

options:

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

cookie:

A cookie that can be used in the DriveUnsetAllSpindownTimeouts() method to unset the spindown timeout for drives.

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


DriveUnsetAllSpindownTimeouts ()

DriveUnsetAllSpindownTimeouts (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


LinuxLvm2VGStart ()

LinuxLvm2VGStart (in  's'  uuid,
                  in  'as' options)

Starts all logical volumes in Linux LVM2 Volume Group.

uuid:

The UUID of the volume group to start.

options:

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

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2VGStop ()

LinuxLvm2VGStop (in  's'  uuid,
                 in  'as' options)

Stops all logical volumes in Linux LVM2 Volume Group.

uuid:

The UUID of the volume group to stop.

options:

Options for stopping the VG. Currently no options are supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2VGSetName ()

LinuxLvm2VGSetName (in  's' uuid,
                    in  's' name)

Sets the name for a volume group.

uuid:

The UUID of the volume group to set the name for.

name:

The new name for the volume group.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2VGAddPV ()

LinuxLvm2VGAddPV (in  's'  uuid,
                  in  'o'  physical_volume,
                  in  'as' options)

Adds a Physical volume to a Linux LVM2 Volume Group. Existing data on the given device to use for a physical volume will be erased.

uuid:

The UUID of the volume group to add a physical volume to.

physical_volume:

The objcet path of the device to use as a physical volume.

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2VGRemovePV ()

LinuxLvm2VGRemovePV (in  's'  vg_uuid,
                     in  's'  pv_uuid,
                     in  'as' options)

Removes a Physical volume from a Linux LVM2 Volume Group.

vg_uuid:

The UUID of the volume group to remove the physical volume from.

pv_uuid:

The UUID of the physical volume to remove from the VG.

options:

Currently unused.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2LVSetName ()

LinuxLvm2LVSetName (in  's' group_uuid,
                    in  's' uuid,
                    in  's' name)

Sets the name for a logical volume.

group_uuid:

The UUID of the volume group for the logical volume.

uuid:

The UUID of the logical volume to set the name for.

name:

The new name for the logical volume.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2LVStart ()

LinuxLvm2LVStart (in  's'  group_uuid,
                  in  's'  uuid,
                  in  'as' options)

Starts a LVM2 logical volume.

group_uuid:

The UUID of the volume group of the logical volume to start belongs to.

uuid:

The UUID of the logical volume to start.

options:

Options for starting the logical volume. Currently no options are supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2LVRemove ()

LinuxLvm2LVRemove (in  's'  group_uuid,
                   in  's'  uuid,
                   in  'as' options)

Removes a LVM2 logical volume.

group_uuid:

The UUID of the volume group of the logical volume to start belongs to.

uuid:

The UUID of the logical volume to remove.

options:

Options used for the removal of the logical volume. Currently no options are supported.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


LinuxLvm2LVCreate ()

LinuxLvm2LVCreate (in  's'  group_uuid,
                   in  's'  name,
                   in  't'  size,
                   in  'u'  num_stripes,
                   in  't'  stripe_size,
                   in  'u'  num_mirrors,
                   in  'as' options,
                   in  's'  fstype,
                   in  'as' fsoptions,
                   out 'o'  created_device)

Creates a new LVM2 logical volume.

group_uuid:

The UUID of the volume group to create a logical volume in.

name:

The name for the logical volume.

size:

The size of the logical volume, in bytes.

num_stripes:

Number of stripes to use.

stripe_size:

The stripe size to use or 0 if @num_stripes is 0. This must be a power of two.

num_mirrors:

Number of mirrors to use.

options:

Options used when creating the logical volume. Currently no options are supported.

fstype:

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

fsoptions:

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

created_device:

The object path of the newly added logical volume.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


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

if one of the given components 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 the following PolicyKit authorization:

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


LinuxMdCreate ()

LinuxMdCreate (in  'ao' components,
               in  's'  level,
               in  't'  stripe_size,
               in  's'  name,
               in  'as' options,
               out 'o'  device)

Creates a Linux md RAID array. The array will be created and assembled.

components:

The object paths of the components to use for the array.

level:

RAID level.

stripe_size:

Stripe Size in bytes, or 0 to use the default stripe size.

name:

Name of the array.

options:

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

device:

The object path of the created array device.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller lacks the appropriate PolicyKit authorization

org.freedesktop.PolicyKit.Error.Busy:

if one of the given components 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 the following PolicyKit authorization:

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


Inhibit ()

Inhibit (out 's' cookie)

Inhibits clients from invoking methods on the daemon of the daemon that require authorization (all methods will return the org.freedesktop.PolicyKit.Error.Inhibited error) if the caller is not the super user. This is typically used by OS installers and other programs that expects full control of the system, specifically to avoid automounting devices.

cookie:

A cookie that can be used in the Uninhibit() method. to stop inhibiting the daemon.

Errors

org.freedesktop.PolicyKit.Error.NotAuthorized:

if the caller is not the super user

Permissions

Only the super user can invoke this method.


Uninhibit ()

Uninhibit (in  's' cookie)

Uninhibits other clients from using the daemon.

cookie:

A cookie obtained from the Inhibit() method.

Errors

org.freedesktop.PolicyKit.Error.Failed:

if the given cookie is malformed

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).

The AdapterAdded signal

AdapterAdded ('o' adapter)

Emitted when an adapter is added.

adapter:

Object path of adapter that was added.

The AdapterRemoved signal

AdapterRemoved ('o' adapter)

Emitted when an adapter is removed.

adapter:

Object path of adapter that was removed.

The AdapterChanged signal

AdapterChanged ('o' adapter)

Emitted when an adapter changed.

adapter:

Object path of adapter that was changed.

The ExpanderAdded signal

ExpanderAdded ('o' expander)

Emitted when an expander is added.

expander:

Object path of expander that was added.

The ExpanderRemoved signal

ExpanderRemoved ('o' expander)

Emitted when an expander is removed.

expander:

Object path of expander that was removed.

The ExpanderChanged signal

ExpanderChanged ('o' expander)

Emitted when an expander changed.

expander:

Object path of expander that was changed.

The PortAdded signal

PortAdded ('o' port)

Emitted when a port is added.

port:

Object path of port that was added.

The PortRemoved signal

PortRemoved ('o' port)

Emitted when a port is removed.

port:

Object path of port that was removed.

The PortChanged signal

PortChanged ('o' port)

Emitted when a port changed.

port:

Object path of port that was changed.

Property Details

The "DaemonVersion" property

'DaemonVersion'  read      's'

The version of the running daemon.


The "DaemonIsInhibited" property

'DaemonIsInhibited'  read      'b'

TRUE only if the daemon is inhibited.


The "SupportsLuksDevices" property

'SupportsLuksDevices'  read      'b'

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


The "KnownFilesystems" property

'KnownFilesystems'  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:IdType 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.