Linux Newbie - Resizing Partitions

General support questions
Wes_B
Posts: 2
Joined: 2017/11/17 19:16:16

Linux Newbie - Resizing Partitions

Postby Wes_B » 2017/11/17 19:39:52

Good Morning All,

A CentOS Newbie here. I have a system that has plenty of unused space on the drive. I mean it has been added to a partition, sda2, but it not used.

I have extended the cl-root to 100G from its original 50B but what I am seeing is shown in the attachment: Output.PNG

How do I get /dev/mapper/cl-root, 50G to see the extra space as shown from lblsk?

Also what would be the best way to move /dev/mapper/cl-home to a new location?

Any assistance is greatly appreciated.
WB
Attachments
Output.PNG
Output.PNG (52.92 KiB) Viewed 177 times

theitguy
Posts: 4
Joined: 2017/10/28 01:43:47
Contact:

Re: Linux Newbie - Resizing Partitions

Postby theitguy » 2017/11/18 01:26:28

Paste a history of commands with the outputs may be helpful.
What are the lvmdiskscan, lvs, pvs and vgs show?

Check this page also: https://www.centos.org/docs/5/html/Clus ... xtend.html
The IT Guy

theitguy
Posts: 4
Joined: 2017/10/28 01:43:47
Contact:

Re: Linux Newbie - Resizing Partitions

Postby theitguy » 2017/11/18 01:30:37

If you are using xfs, "xfs_grow" command can do magic.

Check this discussion also: viewtopic.php?t=56877
The IT Guy

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

Re: Linux Newbie - Resizing Partitions

Postby TrevorH » 2017/11/18 01:52:50

/dev/sda2 is an LVM physical volume. If you expanded the partition from its original size then you need to pvresize /dev/sda2 to resize the PV to occupy the new partition size. Once that's done your LVM Volume Group will contain freespace and you can use lvresize -r to resize both the LVM LV and the filesystem that's on it. See

man pvresize
man lvresize
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Wes_B
Posts: 2
Joined: 2017/11/17 19:16:16

Re: Linux Newbie - Resizing Partitions

Postby Wes_B » 2017/11/20 17:11:20

Thanks for the assistance. I was able to resolve the issue: Xfs_growfs -d /dev/mapper/cl-root .

Regards,
Wes_B

User avatar
jlehtone
Posts: 1879
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Linux Newbie - Resizing Partitions

Postby jlehtone » 2017/11/20 17:57:19

What do you have on the cl-root? The OS takes about 10GB, you have 50GB. Personal files should be in cl-home.