LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lvm

Linux Logical Volume Manager tools

TLDR

Start interactive shell
$ sudo lvm
copy
Initialize physical volume
$ sudo lvm pvcreate /dev/sda1
copy
Display physical volumes
$ sudo lvm pvdisplay
copy
Create volume group
$ sudo lvm vgcreate vg1 /dev/sda1
copy
Display volume groups
$ sudo lvm vgdisplay
copy
Create logical volume
$ sudo lvm lvcreate -L 10G vg1
copy
Display logical volumes
$ sudo lvm lvdisplay
copy

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 volume
pvdisplay
Display physical volume information
vgcreate
Create a volume group
vgdisplay
Display volume group information
lvcreate
Create a logical volume
lvdisplay
Display logical volume information
lvextend
Extend a logical volume
lvreduce
Reduce a logical volume
pvs
Report information about physical volumes
vgs
Report information about volume groups
lvs
Report information about logical volumes
pvremove
Remove a physical volume
vgremove
Remove a volume group
help 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.

SEE ALSO

lvcreate(8), lvextend(8), vgcreate(8), pvcreate(8), pvs(8), vgs(8), lvs(8)

Copied to clipboard
Kai