Page 1 of 1

Help with Extension of Volume

Posted: 2020/06/22 04:13:56
by kwyjibo
Hi,

I must preface this by mentioning that I am currently in the early phases of Linux addiction...but enjoying the challenge so far.

I was hoping someone could assist in helping me with resolving a partition issue I have created..

The need is to extend a partition that is running out of space (sda2 - /dev/mapper/centos-home/Data to be exact).
I feel I have missed a step but would like some advice on how to resolve.
Please refer attachments for results of df -h, lsblk and fdisk -l

Any advice would be much appreciated.

Cheers

Re: Help with Extension of Volume

Posted: 2020/06/22 08:22:10
by TrevorH
Looks like you did everything to extend the logical Volume but didn't resize the filesystem on it. If you'd used lvresize -r ... when you resized teh LV then it would have done that for you. Now you need to extend it manually - for ext3/4 that's using resize2fs and for xfs it's xfs_growfs.

Re: Help with Extension of Volume

Posted: 2020/06/23 23:16:03
by kwyjibo
Thank you for the quick response.

Correct me if I am wrong...but I could run the following command to determine filesystem?
lsblk -f /dev/sda2

Then, simply the following command to extend it the 50 GB?
resize2fs /dev/sda2

If its an xfs filesystem, then the following command to extend sda2 50 GB?
xfs_growfs -d /dev/sda2

Re: Help with Extension of Volume

Posted: 2020/06/24 01:17:56
by TrevorH
Yes except that the device you want to resize is your LV that's mounted as /home not /dev/sda2 which is your LVM Physical Volume. Use /dev/mapper/centos-home if it's /home you want to resize.

Re: Help with Extension of Volume

Posted: 2020/06/24 01:32:05
by kwyjibo
Ahh, perfect..I understand now.
Thank you so much.
Cheers