I have 119Gb in sda2, but centos_template--centos7-root is only 27.8Gb, how can I increase it?
[root@runner~]# lsblk -o NAME,FSTYPE,LABEL,SIZE,MOUNTPOINT
NAME FSTYPE LABEL SIZE MOUNTPOINT
sda 120G
├─sda1 xfs 1G /boot
└─sda2 LVM2_member 119G
├─centos_template--centos7-root xfs 27.8G /
└─centos_template--centos7-swap swap 3.2G [SWAP]
To increase the size of your lv you have to first use lvextend command to increase the size of logical volume:
then you have to xfs_growfs to increase the size of an xfs filesystem:
then you have to xfs_growfs to increase the size of an xfs filesystem:
Just imagine you want to extend 5G:
#lvextend -L +5G /dev/mapper/vggroup_name-lv_name -r (intro)
with the -r you can spare the command xfs_grow (-r will do its job). Do not forget the + simbol in the 5G ---> -L +5G