Manage Physical And Logical Volumes And Volume Groups On Linux Cheat Sheet

1. Main commands

vgs
vgdisplay
vgscan
lvs
lvdisplay
lvscan
pvs
pvdisplay
pvscan

lvm-cheatsheet.png

2. How to extend a logical volume

lvextend -L+1.5G /dev/rootvg/usr_lv;   # Name of the logical volume
resize2fs /dev/rootvg/usr_lv  #Name of the mount point

source : https://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/

3. Get number of inodes per folder

find / -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n 
comments powered by Disqus