- vgcreate – create volume group
- lvcreate – create a logical volume
- removing a logical volume
- lvremove – delete lvm partition.
- lvreduce – reduce lvm partition size.
- lvresize – resize lvm partition.
LVM contains following layers
* Physical Volumes
* Volume Groups
* Logial Volumes
Display Physical Volumes
pvdisplay command is used to display Physical Volumes.
root@server2:~# pvdisplay --- Physical volume --- PV Name /dev/md4 VG Name pve PV Size 1.80 TiB / not usable 3.94 MiB Allocatable yes PE Size 4.00 MiB Total PE 470906 Free PE 1025 Allocated PE 469881 PV UUID h1kshf-do9O-y3jn-eVs3-Rl4V-WLeQ-aSYd9h root@server2:~#
Display Logical Volume Groups
vgdisplay command is used to display Volume Groups.
root@server2:~# vgdisplay --- Volume group --- VG Name pve System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 3 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size 1.80 TiB PE Size 4.00 MiB Total PE 470906 Alloc PE / Size 469881 / 1.79 TiB Free PE / Size 1025 / 4.00 GiB VG UUID mGJc2S-HWVj-kj5q-Dau6-h7XZ-X4sR-Afkgod root@server2:~#
Display Logical Volumes (lvdisplay)
root@server2:~# lvdisplay --- Logical volume --- LV Path /dev/pve/data LV Name data VG Name pve LV UUID nE67m1-2onL-R7AO-48m3-nU8j-pXWd-3QNj5Q LV Write Access read/write LV Creation host, time server2.hostonnet.com, 2015-12-12 16:18:13 -0500 LV Status available # open 1 LV Size 93.65 GiB Current LE 23975 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0 --- Logical volume --- LV Path /dev/pve/vm LV Name vm VG Name pve LV UUID Wtcyaq-xzvT-TXtj-Iuk2-2dWP-9o0P-Wbb4Zv LV Write Access read/write LV Creation host, time server2.hostonnet.com, 2015-12-12 16:18:13 -0500 LV Status available # open 1 LV Size 1.70 TiB Current LE 445906 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:1 root@server2:~#