lvm
Linux Logical Volume Manager tools
TLDR
Start interactive shell
$ sudo lvm
Initialize physical volume$ sudo lvm pvcreate /dev/sda1
Display physical volumes$ sudo lvm pvdisplay
Create volume group$ sudo lvm vgcreate vg1 /dev/sda1
Display volume groups$ sudo lvm vgdisplay
Create logical volume$ sudo lvm lvcreate -L 10G vg1
Display logical volumes$ sudo lvm lvdisplay
SYNOPSIS
lvm [command [OPTIONS]]
DESCRIPTION
lvm is the Linux Logical Volume Manager, providing flexible disk management through physical volumes (PVs), volume groups (VGs), and logical volumes (LVs). It enables dynamic resizing, snapshots, mirroring, and striping.
PARAMETERS
pvcreate
Initialize a physical volumepvdisplay
Display physical volume informationvgcreate
Create a volume groupvgdisplay
Display volume group informationlvcreate
Create a logical volumelvdisplay
Display logical volume informationlvextend
Extend a logical volumelvreduce
Reduce a logical volumepvs
Report information about physical volumesvgs
Report information about volume groupslvs
Report information about logical volumespvremove
Remove a physical volumevgremove
Remove a volume grouphelp command
Display help for a specific command-d, --debug
Enable verbose debugging output (repeat up to 6 times to increase)-v, --verbose
Set verbose level (repeat from 1 to 3 to increase)-t, --test
Run in test mode (don't update metadata)-y, --yes
Answer yes to all confirmation prompts
CAVEATS
LVM requires physical volumes to be initialized before use. Reducing volumes requires careful handling to avoid data loss. Some operations require the logical volume to be unmounted.
HISTORY
LVM2 is the second major version of the Linux Logical Volume Manager, providing enterprise-grade storage management capabilities.
