## org.freedesktop.UDisks2.VolumeGroup

org.freedesktop.UDisks2.VolumeGroup — A volume group

## Methods

    Poll                         ();
    Delete                       (IN  b     wipe,
                                  IN  a{sv} options);
    Rename                       (IN  s     new_name,
                                  IN  a{sv} options,
                                  OUT o     result);
    AddDevice                    (IN  o     block,
                                  IN  a{sv} options);
    EmptyDevice                  (IN  o     block,
                                  IN  a{sv} options);
    RemoveDevice                 (IN  o     block,
                                  IN  b     wipe,
                                  IN  a{sv} options);
    RemoveMissingPhysicalVolumes (IN  a{sv} options);
    CreatePlainVolume            (IN  s     name,
                                  IN  t     size,
                                  IN  a{sv} options,
                                  OUT o     result);
    CreatePlainVolumeWithLayout  (IN  s     name,
                                  IN  t     size,
                                  IN  s     layout,
                                  IN  ao    pvs,
                                  IN  a{sv} options,
                                  OUT o     result);
    CreateThinPoolVolume         (IN  s     name,
                                  IN  t     size,
                                  IN  a{sv} options,
                                  OUT o     result);
    CreateThinVolume             (IN  s     name,
                                  IN  t     size,
                                  IN  o     pool,
                                  IN  a{sv} options,
                                  OUT o     result);
    CreateVDOVolume              (IN  s     lv_name,
                                  IN  s     pool_name,
                                  IN  t     data_size,
                                  IN  t     virtual_size,
                                  IN  t     index_memory,
                                  IN  b     compression,
                                  IN  b     deduplication,
                                  IN  s     write_policy,
                                  IN  a{sv} options,
                                  OUT o     result);

## Properties

    Name                    readable   s
    UUID                    readable   s
    Size                    readable   t
    FreeSize                readable   t
    ExtentSize              readable   t
    NeedsPolling            readable   b
    MissingPhysicalVolumes  readable   as

## Description

Objects implementing this interface represent LVM2 volume groups. They appear under /org/freedesktop/UDisks2/lvm/.

The logical volume objects of a volume group are the children of the volume group objects in the D-Bus object hierarchy. See the org.freedesktop.UDisks2.LogicalVolume interface.

The physical volume objects of a volume group can be found by looking for block devices with a org.freedesktop.UDisks2.PhysicalVolume.VolumeGroup property that points to the volume group object.

Since 2.0.0

## Method Details

### The Poll() method

    Poll ();

Make sure that all properties of this volume group and of all their logical and physical volumes are up-to-date.

The properties are not guaranteed to be up-to-date yet when this method returns.

Since 2.0.0

### The Delete() method

    Delete (IN  b     wipe,
            IN  a{sv} options);

Delete this volume group. All its logical volumes will be deleted, too.

If the option `tear-down` is set to `TRUE`, then all logical volumes will be cleaned up before deletion. This cleanup consists of removing entries from /etc/fstab and /etc/crypttab, and locking of encrypted block devices. Entries in /etc/fstab and /etc/crypttab that have been created with the 'track-parents' options to AddConfigurationItem will be removed even if their block device is currently unavailable.

`IN b `wipe``: | Whether to wipe the volume group.
`IN a{sv} `options``: | Additional options.

Since 2.0.0

### The Rename() method

    Rename (IN  s     new_name,
            IN  a{sv} options,
            OUT o     result);

Rename this volume group. This might cause the volume group object to disappear from D-Bus and reappear with a different path.

No additional options are currently defined.

`IN s `new_name``: | The new name.
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The new object path.

Since 2.0.0

### The AddDevice() method

    AddDevice (IN  o     block,
               IN  a{sv} options);

Add a new physical volume to the volume group. The block device will be wiped and all data on it will be lost.

`IN o `block``: | The block device to add, as a UDisks2 object path.
`IN a{sv} `options``: | Additional options.

Since 2.0.0

### The EmptyDevice() method

    EmptyDevice (IN  o     block,
                 IN  a{sv} options);

Move all data on the given block device somewhere else so that the block device might be removed.

No additional options are currently defined.

`IN o `block``: | The block device to empty, as a UDisks2 object path.
`IN a{sv} `options``: | Additional options.

Since 2.0.0

### The RemoveDevice() method

    RemoveDevice (IN  o     block,
                  IN  b     wipe,
                  IN  a{sv} options);

Remove the indicated physical volume from the volume group. The physical device must be unused.

No additional options are currently defined.

`IN o `block``: | The block device to remove, as a UDisks2 object path.
`IN b `wipe``: | Whether to wipe the physical volume.
`IN a{sv} `options``: | Additional options.

Since 2.0.0

### The RemoveMissingPhysicalVolumes() method

    RemoveMissingPhysicalVolumes (IN  a{sv} options);

Forget about all physical volumes that went missing.

No additional options are currently defined.

`IN a{sv} `options``: |

Since 2.10.0

### The CreatePlainVolume() method

    CreatePlainVolume (IN  s     name,
                       IN  t     size,
                       IN  a{sv} options,
                       OUT o     result);

Create a 'normal' new logical volume. Calling this method is equivalent to calling CreatePlainVolumeWithLayout with "linear" as the layout type and an empty array of physical volumes.

No additional options are currently defined.

`IN s `name``: | The name of the new logical volume.
`IN t `size``: | The size.
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The object path of the new logical volume.

Since 2.0.0

### The CreatePlainVolumeWithLayout() method

    CreatePlainVolumeWithLayout (IN  s     name,
                                 IN  t     size,
                                 IN  s     layout,
                                 IN  ao    pvs,
                                 IN  a{sv} options,
                                 OUT o     result);

Create a 'normal' new logical volume with the given layout type on the given physical volumes. It is okay to leave "pvs" empty; LVM2 will then choose suitable ones on its own.

If "pvs" is not empty and the given "layout" uses subvolumes (like all the raid variants), then this method will create exactly one subvolume for each given physical volume.

For example, when "layout" is "raid5" and "pvs" contains four entries, then this method will have the same effect as "lvcreate --type raid5 --stripes 3 ...": The resulting logical volume will have four subvolumes.

The "subvolumes" (i) option can be used to override the number of subvolumes. The consequences of this are hard to predict and might also lead to creation of logical volumes that have less redundancy than expected, so it is best to always create exactly one subvolume per physical volume.

Note again that this only happens when "pvs" is not empty. When "pvs" is empty, LVM2 will decide how many subvolumes to create.

`IN s `name``: | The name of the new logical volume.
`IN t `size``: | The size.
`IN s `layout``: | The layout type, like "linear", "raid5"
`IN ao `pvs``: | The physical volumes to use
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The object path of the new logical volume.

Since 2.10.0

### The CreateThinPoolVolume() method

    CreateThinPoolVolume (IN  s     name,
                          IN  t     size,
                          IN  a{sv} options,
                          OUT o     result);

Create a new logical volume that can be used to back thinly-provisioned logical volumes. The `size` parameter is the total amount of space taken out of the volume group. That space will be used for data and metadata. The actual amount of data that can be stored in the pool will be slightly smaller.

No additional options are currently defined.

`IN s `name``: | The name of the new logical volume.
`IN t `size``: | The total size.
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The object path of the new logical volume.

Since 2.0.0

### The CreateThinVolume() method

    CreateThinVolume (IN  s     name,
                      IN  t     size,
                      IN  o     pool,
                      IN  a{sv} options,
                      OUT o     result);

Create a new thinly provisioned logical volume in the given pool.

No additional options are currently defined.

`IN s `name``: | The name of the new logical volume.
`IN t `size``: | The virtual size.
`IN o `pool``: | The thin pool to use.
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The object path of the new logical volume.

Since 2.0.0

### The CreateVDOVolume() method

    CreateVDOVolume (IN  s     lv_name,
                     IN  s     pool_name,
                     IN  t     data_size,
                     IN  t     virtual_size,
                     IN  t     index_memory,
                     IN  b     compression,
                     IN  b     deduplication,
                     IN  s     write_policy,
                     IN  a{sv} options,
                     OUT o     result);

Create a new VDO logical volume that is backed by a newly created VDO pool. The VDO data logical volume and VDO pool logical volume are created together, VDO pool supports only a single VDO LV. The `data_size` parameter is the total amount of space taken out of the volume group and it's the size of the `pool_name` VDO pool logical volume. The `virtual_size` is the size of the `lv_name` VDO logical volume and represents expected amount of the data that can be stored after deduplication and compression.

No additional options are currently defined.

Known `write_policy` values include:

sync | Writes are acknowledged only after data is on stable storage. 'sync' policy is not supported if the underlying storage is not also synchronous.
async | Writes are acknowledged when data has been cached for writing to stable storage; data which has not been flushed is not guaranteed to persist in this mode.
auto | VDO will check the storage device and determine whether it supports flushes. If it does, VDO will run in async mode, otherwise it will run in sync mode.

`IN s `lv_name``: | The name of the to-be-created VDO LV.
`IN s `pool_name``: | The name of the to-be-created VDO pool LV or an empty string for a default name.
`IN t `data_size``: | The size of the data VDO LV (physical size of the `pool_name` VDO pool LV).
`IN t `virtual_size``: | The virtual_size of the `lv_name` VDO LV or 0 for default (`data_size` minus metadata).
`IN t `index_memory``: | Amount of index memory in bytes or 0 for default.
`IN b `compression``: | Enables or disables compression when creating the VDO volume.
`IN b `deduplication``: | Enables or disables deduplication when creating the VDO volume.
`IN s `write_policy``: | Specifies the write policy.
`IN a{sv} `options``: | Additional options.
`OUT o `result``: | The object path of the new VDO logical volume.

Since 2.9.0

## Property Details

### The "Name" property

    Name  readable   s

The name of this volume group, as known to LVM2.

Since 2.0.0

### The "UUID" property

    UUID  readable   s

The UUID this volume group. It is guaranteed to be unique, but it might change over time.

Since 2.0.0

### The "Size" property

    Size  readable   t

The total capacity of this volume group, in bytes.

Since 2.0.0

### The "FreeSize" property

    FreeSize  readable   t

The unused capacity of this volume group, in bytes.

Since 2.0.0

### The "ExtentSize" property

    ExtentSize  readable   t

The size of extents. When creating and resizing logical volumes, sizes are rounded up to multiples of the extent size.

Since 2.0.0

### The "NeedsPolling" property

    NeedsPolling  readable   b

Whether or not this volume group needs to be periodically polled to guarantee updates.

Since 2.0.0

### The "MissingPhysicalVolumes" property

    MissingPhysicalVolumes  readable   as

A list of the UUIDs of missing physical volumes.

Since 2.10.0