What it does
lvs prints one line per LV with its VG, attributes, size, and for snapshots and thin volumes the data use. lvdisplay gives the device path, UUID, status and extent count. lvscan lists all LVs with their state (ACTIVE/inactive).
How to write it
lvs [OPTION]... [VG|VG/LV...]
lvdisplay [OPTION]... [VG|VG/LV...]
lvscan [OPTION]...Options 28
Most used
Report (lvs)
Common LVM options
Nothing matches this filter.
Examples 10
$ run as a normal user# run as root (or with sudo)
1All LVs
lvs LV VG Attr LSize Pool Origin Data% Meta% root rhel -wi-ao---- <17.00g swap rhel -wi-ao---- 2.00g lvdata vgdata -wi-ao---- 5.00ga = active, o = open (mounted).
2Details with path
lvdisplay /dev/vgdata/lvdataLV Path, UUID, LV Size, Current LE.
3Which disks does an LV use?
lvs -o +devicesImportant before removing a PV.
4Size in MiB or extents
lvs --units m; lvs -o lv_name,seg_size_peCheck exam tasks with extents.
5Snapshot and thin use
lvs -o lv_name,origin,data_percent,metadata_percentA full snapshot becomes invalid; a full thin pool stops writes.
6All LVs including hidden ones
lvs -aPool data, metadata and RAID images.
7Extent map
lvdisplay -m /dev/vgdata/lvdataWhich PV ranges are used.
8List with state
lvscan ACTIVE '/dev/rhel/root' [<17.00 GiB] inheritInactive LVs cannot be mounted (vgchange -ay).
9JSON
lvs --reportformat json -o lv_name,lv_size,vg_nameFor automation.
10Large LVs only
lvs -S 'lv_size>10g'Filter the report.
Nothing matches this filter.
Exit codes
0 :: Done. 5 :: Error.