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
Mapper Files
- /dev/mapper/VG_NAME-LV_NAME
- /dev/VG_NAME/LV_NAME
Definitions
- PV: Physical Volume
- VG: Volume Group
- LV: Logical Volume
Install LVM Version 2
Before we get started, we need to install the lvm version 2 toolkit:
Commands
Physical Volume
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
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
Create Logical Volumes
Change Logical Volumes Attributes
Add Space to Logical Volumes
1
|
lvextent -L [+] # Plus means accumulation, without plus means assignment.
|
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)
Buy me a coffee