Centos 7 - Extend volume group to consume remaining space
I'm throwing Centos 7 on an old laptop with a 128GB hard disk. During the install I chose to have it automatically partition (bad idea). After install was complete I noticed that it created /dev/mapper/home as a separate lvm (65GB) from /dev/mapper/root (50GB).
I'd prefer to keep all my stuff under / as opposed to a separate lvm for /home So I umount /home and lvremove it.
When I run vgdisplay I see Free PE / Size 65.00GB.
How can I have my entire /root lvm take up the remainder of the Free PE in the volume group? I've tried lvextend and vgextend but it doesnt appear to work, still shows 65GB free. Any advice appreciated.
I'd prefer to keep all my stuff under / as opposed to a separate lvm for /home So I umount /home and lvremove it.
When I run vgdisplay I see Free PE / Size 65.00GB.
How can I have my entire /root lvm take up the remainder of the Free PE in the volume group? I've tried lvextend and vgextend but it doesnt appear to work, still shows 65GB free. Any advice appreciated.
Comments
-
alias454 Member Posts: 648 ■■■■□□□□□□Extend the logical volume
lvextend -l100%FREE /dev/mapper/root
If you used an xfs filesystem (it should be the default)
yum install xfsprogs.x86_64 xfs_growfs /dev/mapper/root“I do not seek answers, but rather to understand the question.” -
phoeneous Member Posts: 2,333 ■■■■■■■□□□Thanks. Syntax ended up being /dev/name of volume group/name of logical volume. So lvextend -l +100%FREE /dev/centos/root worked perfect.
https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/lv_extend.html -
varelg Banned Posts: 790Prepare your backup and practice restoring from backup because you'll need that after updating CentOS 7. It has a strange propensity to ask for the old disk geometry, and when not found- will not boot.
-
JockVSJock Member Posts: 1,118You'll still need to finalize the space growth so the OS can see it after running lvextend command:
xfs_growfs /mnt/mount_point_here
Should see output that pertains to the XFS filesystems.
Also check that the OS see it withdf -ha
***Freedom of Speech, Just Watch What You Say*** Example, Beware of CompTIA Certs (Deleted From Google Cached)
"Its easier to deceive the masses then to convince the masses that they have been deceived."
-unknown