D.2. Container operations

D.2.1. Creating LVM containers

Containers are created with an initial set of objects. In the LVM plug-in, the objects can be disks, segments, or regions. LVM has two options for creating containers. The value of these options cannot be changed after the container has been created. The options are:

name

The name of the new container.

pe_size

The physical extent (PE) size, which is the granularity with which regions can be created. The default is 16 MB. Each region must have a whole number of extents. Also, each region can have only up to 65534 extents. Thus, the PE size for the container limits the maximum size of a region in that container. With the default PE size, an LVM region can be, at most 1 TB. In addition, each object consumed by the container must be big enough to hold at least five extents. Thus, the PE size cannot be arbitrarily large. Choose wisely.

D.2.2. Adding objects to LVM containers

You can add objects to existing LVM containers in order to increase the pool of storage that is available for creating regions. A single container can consume up to 256 objects. Because the name and PE size of the containers are set when the container is created, no options are available when you add new objects to a container. Each object must be large enough to hold five physical extents. If an object is not large enough to satisfy this requirement, the LVM plug-in will not allow the object to be added to the container.

D.2.3. Removing objects from LVM containers

You can remove a consumed object from its container as long as no regions are mapped to that object. The LVM plug-in does not allow objects that are in use to be removed their their container. If an object must be removed, you can delete or shrink regions, or move extents, in order to free the object from use.

No options are available for removing objects from LVM containers.

D.2.4. Deleting LVM containers

You can delete a container as long as the container does not have any produced regions. The LVM plug-in does not allow containers to be deleted if they have any regions. No options are available for deleting LVM containers.