About LVM thin volumes
To enable advanced storage capabilities, such as volume snapshots and volume cloning, complete specific configuration steps. Preparing your environment ensures that the necessary components are active and ready to support these features for your workloads.
The following list describes the configuration steps:
-
Configure both the logical volume manager storage (LVMS) provider and the node.
-
Provision a logical volume manager (LVM) thin-pool on the RHEL for Edge host.
-
Attach LVM thin-pools to a volume group.
|
|
To create Container Storage Interface (CSI) snapshots, you must configure thin volumes on the RHEL for Edge host. The CSI does not support volume shrinking. |
|
|
When using thin provisioning, you must monitor the storage pool and add more capacity as the available physical space runs out. You can configure the storage pool to auto expand when there is available space within the volume group (VG). See "Creating a thin logical volume". |
For LVMS to manage thin logical volumes (LVs), a thin-pool device-class array must be specified in the etc/lvmd.yaml configuration file. Multiple thin-pool device classes are permitted.
If additional storage pools are configured with device classes, then additional storage classes must also exist to expose the storage pools to users and workloads. To enable dynamic provisioning on a thin-pool, a StorageClass resource must be present on the node. The StorageClass resource specifies the source device-class array in the topolvm.io/device-class parameter.
lvmd.yaml file that specifies a single device class for a thin-poolsocket-name:
device-classes:
- name: thin
default: true
spare-gb: 0
thin-pool:
name: thin
overprovision-ratio: 1
type: thin
volume-group: ssd
where:
socket-name-
Specifies the UNIX domain socket endpoint of gRPC. Defaults to
/run/lvmd/lvmd.socket. Takes a string value. device-classes-
Specifies a list of maps for the settings for each
device-class. device-classes.name-
Specifies the unique name of the
device-class. Takes a string value. device-classes.spare-gb-
Specifies storage capacity in GB to be left unallocated in the volume group. Defaults to
0. Takes an unsigned 64-bit integer. thin-pool.overprovision-ratio-
Specifies a float factor by which you can provision additional storage based on the available storage in the thin pool. For example, if this field is set to
10, you can provision up to 10 times the amount of available storage in the thin pool. To disable over-provisioning, set this field to1. type-
Specifies thin provisioning is required to create volume snapshots.
volume-group-
Specifies the group where the
device-classcreates the logical volumes. Takes a string value.
|
|
When multiple PVCs are created simultaneously, a race condition prevents LVMS from accurately tracking the allocated space and preserving the storage capacity for a device class. Use separate volume groups and device classes to protect the storage of highly dynamic workloads from each other. |