63. LVM - Logical Volume Management
Contents
Through the logical volume management technology provided by Linux, we can flexibly manipulate the file systems in every volume.
Prerequisite
The used partitions’ system types must be defined as 8e (Linux LVM).
Device File
- /dev/dm-#
Mapper Files
-
/dev/mapper/VG_NAME-LV_NAME
- /dev/mapper/vol0-root
-
/dev/VG_NAME/LV_NAME
- /dev/vol0/root
Definitions
-
PV: Physical Volume
- PE: Physical Extent
- VG: Volume Group
-
LV: Logical Volume
- LE: Logical Extent
Install LVM Version 2
Before we get started, we need to install the lvm version 2 toolkit:
|
|
Commands
Physical Volume
View Information About Physical Volumes
|
|
View the Attributes of the Physical Volume(s)
|
|
Initialize the Physical Volume(s)
|
|
Remove the LVM label(s) from the Physical Volume(s)
|
|
Volume Group
View Information About Volume Groups
|
|
View a Volume Group Information
|
|
Create Volume Groups
|
|
Add Physical Volumes to the Volume Group
|
|
Remove Physical Volume(s) from Volume Group(s)
|
|
Remove Volume Group(s)
|
|
Switch a Volume Group to Unusable State
|
|
Switch a Volume Group to Usable State
|
|
Logical Volume
View Information About Logical Volumes
|
|
View a Logical Volume Information
|
|
Create Logical Volumes
|
|
Change Logical Volumes Attributes
|
|
Add Space to Logical Volumes
|
|
Reduces sizes of Logical Volumes
|
|
Remove Logical Volumes
|
|
References PVS(8), PVDISPLAY(8), PVCREATE(8), PVREMOVE(8), VGS(8), VGDISPLAY(8), VGCREATE(8), VGEXTEND(8), LVREDUCE(8), VGREMOVE(8), VGEXPORT(8), VGIMPORT(8), LVS(8), LVDISPLAY(8), LVCREATE(8), LVCHANGE(8), LVEXTEND(8), LVREDUCE(8), LVREMOVE(8)
Author Dong Chen
LastMod Thu Apr 4 2019