The Module


Obfuscate the logical volume.

Parameters:path – logical volume path
create_volume(vg, lv, size, sparse=False)

Create LVM image.

Creates a LVM image with given size.

  • vg – existing volume group which should hold this image
  • lv – name for this image (logical volume)

size of image in bytes


create sparse logical volume


Return free/used/total space info for a volume group in bytes

Parameters:vg – volume group name
Returns:A dict containing: :total: How big the filesystem is (in bytes) :free: How much space is free (in bytes) :used: How much space is used (in bytes)

Get logical volume size in bytes.

Parameters:path – logical volume path
Raises:processutils.ProcessExecutionError if getting the volume size fails in some unexpected way.
Raises:exception.VolumeBDMPathNotFound if the volume path does not exist.

List logical volumes paths for given volume group.

Parameters:vg – volume group name
Returns:Return a logical volume list for given volume group : Data format example : [‘volume-aaa’, ‘volume-bbb’, ‘volume-ccc’]

Remove one or more logical volume.


Get logical volume info.

Parameters:path – logical volume path
Returns:Return a dict object including info of given logical volume : Data format example : {‘#Seg’: ‘1’, ‘Move’: ‘’, ‘Log’: ‘’, ‘Meta%’: ‘’, ‘Min’: ‘-1’, : ... : ‘Free’: ‘9983’, ‘LV’: ‘volume-aaa’, ‘Host’: ‘’, : ‘Active’: ‘active’, ‘Path’: ‘/dev/vg/volume-aaa’, ‘#LV’: ‘3’, : ‘Maj’: ‘-1’, ‘VSize’: ‘50.00g’, ‘VFree’: ‘39.00g’, ‘Pool’: ‘’, : ‘VG Tags’: ‘’, ‘KMaj’: ‘253’, ‘Convert’: ‘’, ‘LProfile’: ‘’, : ‘#Ext’: ‘12799’, ‘Attr’: ‘-wi-a—–’, ‘VG’: ‘vg’, : ... : ‘LSize’: ‘1.00g’, ‘#PV’: ‘1’, ‘#VMdaCps’: ‘unmanaged’}

Previous topic

The Module

Next topic

The Module

Project Source

This Page