← Linux// SCRIPTS
Storage & LVM
How to map logical volumes to disks in Linux
Map the LVM tree from logical volumes down to physical disks with lsblk and lvs -o +devices.
How to create and manage an LVM snapshot in Linux
Create a point-in-time LVM snapshot for backups or a safe rollback point, then merge or remove it.
How to check LVM physical volumes, volume groups, and logical volumes in Linux
See the LVM layout: physical volumes, volume groups, and logical volumes with pvs, vgs, and lvs.
How to extend a logical volume and grow the filesystem in Linux
Grow a logical volume and its filesystem online with lvextend -r, or manually with resize2fs (ext4) and xfs_growfs (XFS).
How to add a disk to an LVM volume group in Linux
Add capacity to a volume group by initializing a new disk as a physical volume and extending the VG with vgextend.
How to create an LVM volume in Linux
Build LVM storage: initialize a physical volume, create a volume group, carve out a logical volume, and put a filesystem on it.