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.

LVM (Logical Volume Manager)
LVM (Logical Volume Manager)

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

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

LVM (Logical Volume Manager)

What Is LVM (Logical Volume Manager)

 Create New PV (Physical Volume)

 Add/Remove PV on VG on the Fly

 Create LV on VG on the Fly

 Extend /home LV with a New Partition

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Software Package Manager on CentOS - DNF and YUM

 Running Apache Web Server (httpd) on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

 LDAP (Lightweight Directory Access Protocol)

 GCC - C/C++ Compiler

 Graphics Environments on Linux

 Conda - Environment and Package Manager

 Tools and Utilities

 Administrative Tasks


 Full Version in PDF/EPUB