Linux Introduction
VI-EDITOR
Process Management
Linux Installation
Disk Partitions & File System Management
Logical Volume Management - LVM
User & Group Administration
Package Management
Network File System - NFS
Domain Naming System - DNS
Apache HTTP Web Server
KickStart Installations
FTP server
BOOT PROCESS
Dynamic Host Configuration Protocol - DHCP
Job Scheduling
File Links
Swap Management
Log Management
Performance Management
Linux Troubleshooting
Linux Summary
116 Followers
What if you have created a File System of size 10GB on a disk partition and now you would like to increase the File System size as the current size not suffient to store the data?
Since the File System is directly mounted on disk partition or disk its quite difficult to resie the File System .
LVM makes File System management simple and easy as LVM creates File System on Logical Volumes. LVM offers below advantages:
Logical Volume Manager (LVM) is the way to virtualize the disk or disk partitions into Logical Drives allowing you to grow, shrink, or move those partitions from drive to drive as your needs change.LVM also allows you to create larger partitions than you could achieve with a single drive.
LVM Architecture:
Above picture shows the structure of LVM. LVM consists of Physical Volumes, Volume Group, Logical Volumes and finally file systems. The Physical Partitions are known as Physical Extents (PE), and the Logical Partitions are known as logical Extents (LE)
Components of LVM in Linux:
Physical Volume (PV)
It is the standard partition that you add to the LVM. Normally, a physical volume is a standard primary or logical partition with the hex code 8e.
Physical Extent (PE)
It is a chunk of disk space. Every PV is divided into a number of equal sized PEs.
Volume Group (VG)
It is composed of group of Physical Volumes .
Logical Volume (LV)
Logical Volume is composed of a group of LEs. You can format and mount any file system on an LV.
Logical Extent (LE)
It is also a chunk of disk space. Every LE is mapped to a specific PE.
pvs | Displays all the physical volumes | |
vgs | Displays all volume groups in the system | |
lvs | Displays all the logical volumes in the system | |
pvdisplay | Displays detailed information on physical volumes | |
vgdisplay | Displays detailed information on volume groups | |
lvdisplay | Displays detailed information on logical volumes | |
pvcreate | Create a new physical volume | |
vgcreate | Create a new volume group. | |
lvcreate | Creates a new logical volume | |
vgextend | Add a new physical disk to a volume group. | |
lvextend | Extends a logical volume | |
lvresize | Resizes a logical volume | |
lvreduce | Reduces a logical volume | |
pvmove | Moves/migrates data from one physical volume to another | |
vgreduce | Reduces a volume group by removing a PV from it. | |
pvremove | Deletes a physical volume | |
vgremove | Removes /Deletes a volume group | |
lvremove | Removes /Deletes a logical volume |