LVM Thin Volumes enable efficient disk space allocation by only using physical storage as data is written. This helps optimize disk utilization and allows for easier management of large numbers of snapshots and over-provisioning of storage.
See the LVM naming scheme to provide meaningful names for LVM Thin volumes in /dev/mapper/.
# load the required kernel module
modprobedm-thin-pool
# create the pv
pvcreate/dev/vda2
# create the vg, see naming scheme above
vgcreateboot_$(hostname-s|tr-d'-')_vg1/dev/vda2
# create a 250G thin pool logical volume as a container for the thin extents
lvcreate-L250G-T-nboot_$(hostname-s|tr-d'-')_vg1/boot_thin_lv1
# create the thin extents in the thin pool
lvcreate-V300G-Tboot_$(hostname-s|tr-d'-')_vg1/boot_thin_lv1-ndata_lv1
lvcreate-V20G-Tboot_$(hostname-s|tr-d'-')_vg1/boot_thin_lv1-nvar_lv1
lvcreate-V25G-Tboot_$(hostname-s|tr-d'-')_vg1/boot_thin_lv1-nvar_log_lv1
# create a contiguous swap extent
lvcreate-Cy-L8Gboot_$(hostname-s|tr-d'-')_vg1-nswap_lv1
# create the filesystem
mkfs.ext4-LDATA/dev/boot_$(hostname-s|tr-d'-')_vg1/var_data_lv1
mkfs.ext4-LVARLOG/dev/boot_$(hostname-s|tr-d'-')_vg1/var_log_lv1
mkfs.ext4-LLOGAUDIT/dev/boot_$(hostname-s|tr-d'-')_vg1/var_log_audit_lv1
mkswap-LSWAP/dev/boot_$(hostname-s|tr-d'-')_vg1/swap_lv1