LVM - Logical Volume Manager Commands 101 
[aesteban@localhost ~]$  # PVS, VGS and LVS commands
[aesteban@localhost ~]$
[aesteban@localhost ~]$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 fedora lvm2 a-- 237.98g 4.00m
[aesteban@localhost ~]$
[aesteban@localhost ~]$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
fedora 1 3 0 wz--n- 237.98g 4.00m
[aesteban@localhost ~]$
[aesteban@localhost ~]$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home fedora -wi-ao---- 180.17g
root fedora -wi-ao---- 50.00g
swap fedora -wi-ao---- 7.81g
[aesteban@localhost ~]$
[aesteban@localhost ~]$

[aesteban@localhost ~]$ # LVSCAN and LVDISPLAY commands
[aesteban@localhost ~]$
[aesteban@localhost ~]$ sudo lvscan
ACTIVE '/dev/fedora/swap' [7.81 GiB] inherit
ACTIVE '/dev/fedora/home' [180.17 GiB] inherit
ACTIVE '/dev/fedora/root' [50.00 GiB] inherit
[aesteban@localhost ~]$
[aesteban@localhost ~]$ sudo lvdisplay /dev/fedora/home
--- Logical volume ---
LV Path /dev/fedora/home
LV Name home
VG Name fedora
LV UUID V6WFgj-PA3l-TYA7-fZ2J-IC0z-3yL4-4Rttov
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2016-10-19 10:59:08 -0700
LV Status available
# open 1
LV Size 180.17 GiB
Current LE 46123
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

[aesteban@localhost ~]$
[aesteban@localhost ~]$

[aesteban@localhost ~]$ 
[aesteban@localhost ~]$ sudo lvm
lvm>
lvm>
lvm>
lvm> lvscan
ACTIVE '/dev/fedora/swap' [7.81 GiB] inherit
ACTIVE '/dev/fedora/home' [180.17 GiB] inherit
ACTIVE '/dev/fedora/root' [50.00 GiB] inherit
lvm>
lvm>


Physical volumes commands:
pvcreate
pvmove
pvresize
...etc.

Volume groups commands:
vgcreate
vgextend
vgconvert
vgreduce
...etc.

Logical volumes commands:
lvmcache
lvmthin
lvconvert
lvchange
lvextend
lvreduce
lvremove
lvrename
...etc.

See new kid on the block (as of 2017) : SSM, system storage manager.


Comments
Comments are not available for this entry.
2024 By Angel Cool