NAME

lvm - The LCFG lvm component

DESCRIPTION

This component provides LVM support for LCFG. It allows the creation of Volume Groups (VGs) on top of Physical Volumes (PVs), containing Logical Volumes (LVs). It should also handle the addition or removal of PVs, provided enough disk space remains to contain all the data of the VG.

METHODS

The standard configure method is supported. This method takes the optional argument force. If this argument is used then the lvm component will undertake potentially destructive actions (LV removal, VG removal etc). If not used, only 'safe' Create or Modify actions will occur. Note: Without the force argument, the component may fail to complete successfully if you request a modification that relies on prior remove actions.

RESOURCES

lvmpath

Base path to the lvm tools (vgcreate, lvcreate etc).

vgs

A list of Volume Groups to be created by lvm. Each entry on the vgs list accepts two options:

vgname_tag

Optional. The name of the Volume Group. The component will use the tag as the name if this resource is undefined.

pvs_tag

A list of physical volumes (i.e block devices) to be added to this volume group.

lvs

A list of Logical Volumes to be created by lvm. Each entry on the lvs list accepts the following options:

lvname_tag

Optional. The name of the Logical Volume. The component will use the tag as the name if this resource is undefined.

lvsize_tag

The size of the Logical Volume. This can either be specified in bytes (no suffix), in Kilo/Mega/Giga/Tera/Petabytes (Suffix: K,M,G,T,P), or as a percentage of total volume group size (Suffix: %).

lvgroup_tag

The Volume Group (vgname_tag) with which this Logical Volume should be associated.

EXAMPLE

Creating a Volume Group, made up of 2 block devices, and divided into 2 Logical Volumes of 1.5GB each:

 !lvm.vgs        mADD(vg1)
 lvm.vgname_vg1  vgOne
 lvm.pvs_vg1     mADD(/dev/hda2 /dev/hda3)
 
 !lvm.lvs        mADD(lv1 lv2)
 lvm.lvname_lv1  volOne
 lvm.lvname_lv2  volTwo
 lvm.lvsize_lv1  1.5G
 lvm.lvsize_lv2  1.5G    
 lvm.lvgroup_lv1 vgOne
 lvm.lvgroup_lv2 vgOne

If you remove any LVs or VGs from the profile, you will need to explicitly run: om lvm configure force to allow remove actions to occur.

BUGS

All Logical Volumes within a Volume Group must have their size specified using EITHER physical size, OR percentage, but not both. In the above example, specifying:

lvm.lvzise_lv1  1.5G
lvm.lvsize_lv2  80%

would cause an error.

It is not possible to resize a LV by changing the lvsize resource. Doing this relies on being able to have previously reconfigured the filesystem on the LV if corruption is to be avoided. In the near future, increasing the LV size may be allowed, as this can usually occur without filesystem corruption.

PLATFORMS

ScientificLinux5, ScientificLinux6

AUTHOR

Matthew Richardson <m.richardson@ed.ac.uk>

LICENSE

This software is distributed under the GPLv2 license.