org.freedesktop.UDisks2.LogicalVolume

org.freedesktop.UDisks2.LogicalVolume — A logical volume

Methods

Activate       (IN  a{sv} options,
                OUT o     result);
Deactivate     (IN  a{sv} options);
Delete         (IN  a{sv} options);
Rename         (IN  s     new_name,
                IN  a{sv} options,
                OUT o     result);
Resize         (IN  t     new_size,
                IN  a{sv} options);
CreateSnapshot (IN  s     name,
                IN  t     size,
                IN  a{sv} options,
                OUT o     result);
CacheAttach    (IN  s     cache_name,
                IN  a{sv} options);
CacheSplit     (IN  a{sv} options);
CacheDetach    (IN  a{sv} options);

Properties

VolumeGroup             readable   o
Name                    readable   s
Active                  readable   b
UUID                    readable   s
Size                    readable   t
DataAllocatedRatio      readable   d
MetadataAllocatedRatio  readable   d
Type                    readable   s
ThinPool                readable   o
Origin                  readable   o
ChildConfiguration      readable   a(sa{sv})
BlockDevice             readable   o

Description

Objects with this interface represent logical volumes in a volume group. Active logical volumes are associated with a block device, which link back to the logical volume object via their "LogicalVolume" property.

Logical volume objects are children of their volume group object, and also link to it via the #VolumeGroup property.

Since 2.0.0

Method Details

The Activate() method

Activate (IN  a{sv} options,
          OUT o     result);

Activate this logical volume, which makes it appear as a block device in the system.

Non-thin snapshots are always activated and deactivated together with their origins.

No additional options are currently defined.

IN a{sv} options:

Additional options.

OUT o result:

The UDisks2 object path of the block device.

Since 2.0.0


The Deactivate() method

Deactivate (IN  a{sv} options);

Deactivate this logical volume, which makes its block device disappear.

Non-thin snapshots are always activated and deactivated together with their origins.

No additional options are currently defined.

IN a{sv} options:

Additional options.

Since 2.0.0


The Delete() method

Delete (IN  a{sv} options);

Delete this logical volume.

If there are any non-thin snapshots of this logical volume, they will be deleted as well.

If this is a thin pool, all its contained thin volumes will be deleted as well.

If the option tear-down is set to TRUE, then the logical volume and all its children 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 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 logical volume. This might cause the logical volume 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 Resize() method

Resize (IN  t     new_size,
        IN  a{sv} options);

Resize this logical volume.

Additional options:

resize_fsys (b): Whether to resize the filesystem on the logical volume as well. Default to 'false'.

force (b): Whether to force the resize even if it might destroy data.

IN t new_size:

The new size, in bytes.

IN a{sv} options:

Additional options.

Since 2.0.0


The CreateSnapshot() method

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

Create a snapshot of this logical volume.

When creating a snapshot of a non-thin volume, a non-zero size must be specified. A non-thin snapshot is created in this case.

When creating a snapshot of a thin volume, specifying a size of zero will create a thin snapshot in the same pool.

When creating a snapshot of a thin volume, specifying a non-zero size will create a non-thin snapshot.

No additional options are currently defined.

IN s name:

The name of the snapshot.

IN t size:

The size of the backing store for the snapshot, in bytes.

IN a{sv} options:

Additional options.

OUT o result:

Since 2.0.0


The CacheAttach() method

CacheAttach (IN  s     cache_name,
             IN  a{sv} options);

Creates cache LV. Logical volume which name is provided, will be formated, converted to cache type and attached to origin logical volume as a cache pool LV. Logical volumes must be in the same volume group.

No additional options are currently defined.

IN s cache_name:

The name of an existing volume.

IN a{sv} options:

Additional options.

Since 2.3.0


The CacheSplit() method

CacheSplit (IN  a{sv} options);

Splits Cache LV to Cache pool LV and Origin LV, not afeecting its content.

No additional options are currently defined.

IN a{sv} options:

Additional options.

Since 2.3.0


The CacheDetach() method

CacheDetach (IN  a{sv} options);

Detaches the cached LV from its cache.

No additional options are currently defined.

IN a{sv} options:

Additional options.

Since 2.6.3

Property Details

The "VolumeGroup" property

VolumeGroup  readable   o

The path of the volume group object that this logical volume belongs to.

Since 2.0.0


The "Name" property

Name  readable   s

The name of this logical volume, as it is known to LVM2.

Since 2.0.0


The "Active" property

Active  readable   b

Whether or not this volume is active.

Since 2.0.0


The "UUID" property

UUID  readable   s

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

Since 2.0.0


The "Size" property

Size  readable   t

The total size of this logical volume in bytes, including the size of the metadata.

Since 2.0.0


The "DataAllocatedRatio" property

DataAllocatedRatio  readable   d

For a thin pool or a non-thin snapshot, indicates how full the area for storing data is. A value of 1.0 corresponds to 100.

Since 2.0.0


The "MetadataAllocatedRatio" property

MetadataAllocatedRatio  readable   d

For a thin pool or a non-thin snapshot, indicates how full the area for storing meta data is. A value of 1.0 corresponds to 100.

Since 2.0.0


The "Type" property

Type  readable   s

The general type of a logical volume. One of "block" or "pool". More types might be defined in the future.

A volume of type "block" can be used as a block device. A volume of type "pool" can be used to create thin volumes.

Since 2.0.0


The "ThinPool" property

ThinPool  readable   o

For a thin volume, the object path of its pool.

Since 2.0.0


The "Origin" property

Origin  readable   o

For a snapshot, the object path of its origin.

Since 2.0.0


The "ChildConfiguration" property

ChildConfiguration  readable   a(sa{sv})

Configuration items belonging to the

block device of this logical volume and its children. This is also valid when this logical volume is not currently active and there is no block device for it. It works via the 'track-parents' options of org.freedesktop.UDisks2.Block.AddConfigurationItem(), which see.

Since 2.0.0


The "BlockDevice" property

BlockDevice  readable   o

For an active LV, the object path of its block device.

Since 2.7.1