D.3. Region operations

D.3.1. Creating LVM regions

You create LVM regions from the freespace in LVM containers. If there is at least one extent of freespace in the container, you can create a new region.

The following options are available for creating LVM regions:

name

The name of the new region.

extents

The number of extents to allocate to the new region. A new region must have at least one extent and no more than the total available free extents in the container, or 65534 (whichever is smaller). If you use the extents option, the appropriate value for the size option is automatically calculated. By default, a new region uses all available extents in the container.

size

The size of the new region. This size must be a multiple of the container's PE size. If you use the size option, the appropriate value for the extents options is automatically calculated. By default, a new region uses all available freespace in the container.

stripes

If the container consumes two or more objects, and each object has unallocated extents, then the new region can be striped across multiple objects. This is similar to RAID-0 striping and achieves an increased amount of I/O throughput across multiple objects. This option specifies how many objects the new region should be striped across. By default, new regions are not striped, and this value is set to 1.

stripe_size

The granularity of striping. The default value is 16 KB. Use this option only if the stripes option is greater than 1.

contiguous

This option specifies that the new region must be allocated on a single object, and that the extents on that object must be physically contiguous. By default, this is set to false, which allows regions to span objects. This option cannot be used if the stripes option is greater than 1.

pv_names

A list of names of the objects the new region should map to. By default, this list is empty, which means all available objects will be used to allocate space to the new region.

D.3.2. Expanding LVM regions

You can expand an existing LVM region if there are unused extents in the container. If a region is striped, you can expand it only by using free space on the objects it is striped across. If a region was created with the contiguous option, you can only expand it if there is physically contiguous space following the currently allocated space.

The following options are available for expanding LVM regions:

add_extents

The number of extents to add to the region. If you specify this option, the appropriate value for the add_size option is automatically calculated. By default, the region will expand to use all free extents in the container.

add_size

The amount of space to add to the region. If you specify this option, the appropriate value for the add_extents option is automatically calculated. By default, the region will expand to use all freespace in the container.

pv_names

A list of names of the objects to allocate the additional space from. By default, this list is empty, which means all available objects will be used to allocate new space to the region.

D.3.3. Shrinking LVM regions

You can shrink an existing LVM region by removing extents from the end of the region. Regions must have at least one extent, so regions cannot be shrunk to zero.

The following options are available when shrinking LVM regions. Because regions are always shrunk by removing space from the end of the region, a list of objects cannot be specified in this command.

remove_extents

The number of extents to remove from the region. If you specify this option, the appropriate value for the remove_size option is automatically calculated. By default, one extent is removed from the region.

remove_size

The amount of space to shrink the region by. If you specify this option, the appropriate value for the remove_extents option is automatically calculated.

D.3.4. Deleting LVM regions

You can delete an existing LVM region as long as it is not currently a compatibility volume, an EVMS volume, or consumed by another EVMS plug-in. No options are available for deleting LVM regions.