Linux Newbie - Resizing Partitions

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

Linux Newbie - Resizing Partitions

Post by 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 1362 times

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

Re: Linux Newbie - Resizing Partitions

Post by 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

Post by 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
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Linux Newbie - Resizing Partitions

Post by 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
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

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

Re: Linux Newbie - Resizing Partitions

Post by 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: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Linux Newbie - Resizing Partitions

Post by 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.

Post Reply