Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
storage:lvm [2019/08/07 17:00]
eServices Greece created
storage:lvm [2019/08/07 17:11] (current)
eServices Greece
Line 1: Line 1:
-=== LVM ===+====== lvm ====== 
 + 
 +===== Resize ===== 
 +==== Logical Volume ==== 
 +=== Increase Logical Volume Size === 
 +Increase by 1GB 
 +<sxh bash>lvextend -L +1G /dev/centos/home</sxh> 
 + 
 + 
 +=== Decrease Logical Volume Size === 
 +Decrease by 1GB 
 +<sxh bash>lvreduce -L 1G /dev/centos/var</sxh> 
 + 
 +=== Filesystem Resize === 
 +For ext3 & ext4 
 +<sxh bash>resize2fs /dev/centos/home</sxh> 
 + 
 +For xfs 
 +<sxh bash>xfs_growfs /dev/centos/home</sxh> 
 + 
 +===== VM Related ===== 
 +=== mount lvm disk on partition === 
 + 
 +<sxh bash> 
 +kpartx -av /dev/volKVM/kvm106_img 
 +mount /dev/mapper/volKVM-kvm106_img1 /mnt 
 +</sxh> 
 + 
 +=== unmount lvm disk === 
 +<sxh bash> 
 +umount /mnt 
 +kpartx -dv /dev/volKVM/kvm106_img 
 +</sxh>