How to extend the size of a xfs?

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]

Solution 1:

To increase the size of your lv you have to first use lvextend command to increase the size of logical volume:

lvextend -L NEW_Size /dev/vg-group-name/lv-name

then you have to xfs_growfs to increase the size of an xfs filesystem:

xfs_growfs -d /dev/vg-group-name/lv-name