Logical Volume Manager: create, resize, and manage logical volumes.
high risk
lvs -a -o +devices && vgs && pvsReview the layout first.lvcreate -s -n pre_change -L 5G <vg>/<lv>Snapshot before resizing or modifying.LVM abstracts physical storage into volume groups (VGs) and logical volumes (LVs) that can be resized live. The core workflow: create physical volumes (PVs) → group into VGs → carve out LVs. LVs can be snapshotted, resized online, and moved between physical disks.
pvs && vgs && lvsShow physical volumes, volume groups, and logical volumes · explain & risk-check →lvcreate -L 10G -n data vg0Create a 10GB logical volume named 'data' in vg0 · explain & risk-check →lvextend -L +5G /dev/vg0/data && resize2fs /dev/vg0/dataExtend LV by 5GB and grow filesystem · explain & risk-check →lvcreate -s -L 5G -n data_snap /dev/vg0/dataCreate a snapshot of a logical volume · explain & risk-check →vgextend vg0 /dev/sdbAdd a new disk to an existing volume group · explain & risk-check →Create LVM snapshots before risky operations: `lvcreate -s -L 2G -n pre_upgrade /dev/vg0/root` — if something goes wrong, revert instantly with `lvconvert --merge /dev/vg0/pre_upgrade`.
Reference text is hand-written and may be incomplete — check man lvm for your version. Test destructive commands on a non-production system first.