Linux Tutorials - Herong's Tutorial Examples - v5.34, by Dr. Herong Yang
What Is LVM (Logical Volume Manager)
Describes what is LVM (Logical Volume Manager) on Linux systems. Commands are provides on how to display LVM related information.
What Is LVM (Logical Volume Manager)? - LVM is a storage manager that allows you to create a single or multiple logical storage volumes across multiple physical disks or partitions.
There are 3 basic concepts used by LVM:
The diagram (source: opensource.com) below provides a good illustration of how PV, VG and LV work together to support file systems.
Main features of LVM:
Here are some commands you can use to display LVM related information on your CentOS computer:
1. List PVs with "pvs" command.
herong$ pvs PV VG Fmt Attr PSize PFree /dev/sda7 cl lvm2 a-- 96.65g 0
2. List VGs with "vgs" command. The output shows that I have 1 VG called "cl" running on 1 PV and serving 3 LV. The total size of the VG is 96.65 GB.
herong$ sudo vgs VG #PV #LV #SN Attr VSize VFree cl 1 3 0 wz--n- 96.65g 0
3. List LVs with "lvs" command. The output shows that I have 3 LVs "home", "root" and "swap", created on the "cl" Volume Group.
herong$ sudo lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log home cl -wi-ao---- 38.94g root cl -wi-ao---- 50.00g swap cl -wi-ao---- 7.71g
4. List LVs mounting points with the "df" command. "cl-root" and "cl-home" LVs are mounted. "cl-swap" is not mounted.
herong$ df | grep cl /dev/mapper/cl-root 52403200 24618844 27784356 47% / /dev/mapper/cl-home 40813088 6703912 34109176 17% /home
See next tutorials for more details on LVM.
Table of Contents