Red Hat Linux Reference Guide

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

Start Preparation Smartly

We have the collection to start prepartion smartly.

Start Assessment

Red Hat Linux Reference Guide

  DevOps Tech Hub

116 Followers

What is LVM?


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:

  • Resize: Resize File Systems mounted on Logical Volumes
  • Snapshot: Create File System Snapshots
  • Mirroring: Replace failed disk drives without impact on the File Systems and data as it supports Mirroring features as well.

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 Volumes (PV)
  • Physical Extent (PE)
  • Volume Group (VG)
  • Logical Volume (LV)
  • Logical Extent (LE)

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.

LVM Commands

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



Previous Next