Help with Extension of Volume

General support questions
Post Reply
kwyjibo
Posts: 3
Joined: 2020/06/22 04:02:24

Help with Extension of Volume

Post by kwyjibo » 2020/06/22 04:13:56

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
Attachments
lsblk.png
lsblk.png (8.41 KiB) Viewed 190 times
df.png
df.png (8.73 KiB) Viewed 190 times
fdisk.png
fdisk.png (25.79 KiB) Viewed 190 times

User avatar
TrevorH
Forum Moderator
Posts: 29171
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help with Extension of Volume

Post by TrevorH » 2020/06/22 08:22:10

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

kwyjibo
Posts: 3
Joined: 2020/06/22 04:02:24

Re: Help with Extension of Volume

Post by kwyjibo » 2020/06/23 23:16:03

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

User avatar
TrevorH
Forum Moderator
Posts: 29171
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Help with Extension of Volume

Post by TrevorH » 2020/06/24 01:17:56

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

kwyjibo
Posts: 3
Joined: 2020/06/22 04:02:24

Re: Help with Extension of Volume

Post by kwyjibo » 2020/06/24 01:32:05

Ahh, perfect..I understand now.
Thank you so much.
Cheers

Post Reply

Return to “CentOS 7 - General Support”