Containers are created with an initial set of objects. These objects can be disks, segments, or regions. There are two options available when creating an LVM2 container:
The name of the new container.
The physical-extent (PE) size, which is the granularity with which regions can be created. The default is 32 MB. Unlike the LVM1 plug-in, there is no limitation to the number of extents that can be allocated to an LVM2 region.
You can add objects to existing LVM containers in order to increase the pool of storage that is available for creating regions. Because the name and extent-size 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 at least one physical extent. If an object is not large enough to satisfy this requirement, the LVM2 plug-in will not allow the object to be added to the container.
You can remove a consumed object from its container as long as no regions are mapped to that object. The LVM2 plug-in does not allow objects that are in use to be removed from 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.
In addition to adding new objects to an LVM2 container, you can also expand the space in a container by expanding one of the existing consumed objects (PVs). For example, if a PV is a disk-segment with freespace immediately following it on the disk, you can expand that segment, which will increase the amount of freespace in the container. Likewise, if a PV is a RAID-0 or RAID-5 region, you can expand that region by adding additional objects, which in turn increases the freespace in the container.
When using the GUI or text-mode UIs, PV-expand is performed by expanding the container. If any of the existing PVs are expandable, they will appear in the expand-points list. Choose the PV to expand, and then the options for expanding that object. After the PV has expanded, the container's freespace will reflect the additional space available on that PV.
When using the CLI, PV-expand is performed by expanding the appropriate object directly. The CLI and the EVMS engine will route the necessary commands so the container is expanded at the same time.
The options for expanding a PV are dependent on the plug-in that owns that PV object. Please see the appropriate plug-in's appendix for more details on options for that object.
In addition to removing existing objects from an LVM2 container, you can also reduce the size of a container by shrinking one of the existing consumed objects (PVs). This is only allowed if the consumed object has physical extents (PEs) at the end of the object that are not allocated to any LVM2 regions. In this case, LVM2 will allow the object to shrink by the number of unused PEs at the end of that object.
For example, if a PV is a desk-segment, you can shrink that segment, which will decrease the amount of freespace in the container. Likewise, if a PV is a RAID-0 or RAID-5 region, you can shrink that region by removing one of the objects, which in turn decreases the freespace in the container.
When using the GUI or text-mode UIs, PV-shrink is performed by shrinking the container. If any of the existing PVs are shrinkable, they will appear in the shrink-points list. Choose the PV to shrink, and then the options for shrinking that object. After the PV has shrunk, the container's freespace will reflect the reduced space available on that PV.
When using the CLI, PV-shrink is performed by shrinking the appropriate object directly. The CLI and the EVMS engine will route the necessary commands so the container is shrunk at the same time.
The options for shrinking a PV are dependent on the plug-in that owns that PV object. Please see the appropriate plug-in's appendix for more details on options for that object.
You can delete a container as long as the container does not have any produced regions. The LVM2 plug-in does not allow containers to be deleted if they have any regions. No options are available for deleting LVM2 containers.
You can rename an existing LVM2 container. When renaming an LVM2 container, all of the regions produced from that container will automatically have their names changed as well, because the region names include the container name. In the EVMS GUI and text-mode UIs, this is done using the modify properties command, which is available through the "Actions" menu or the context-sensitive pop-up menus. In the EVMS CLI, this is done using the set command.
See Section 2.5, “Renaming LVM2 regions” for more information about the effects of renaming the regions.