Page 1 of 1

Shrink root Volume

Posted: 2019/11/07 12:36:29
by NuwanthaD
Hi CentOS support,

How do we shrink volume in CentOS 7. Our real requirement is we have 200GB root partition need to reduce it to 100GB without damaging the data, how can we do it.
This VM runs on VMware ESXI 6.5,

Appreciate your help,

Re: Shrink root Volume

Posted: 2019/11/07 14:41:11
by TrevorH
Check the output from df -hT / and see what filesystem is in use. If it's xfs then it cannot be shrunk. At all. You're in for a reinstall to fix that.

Re: Shrink root Volume

Posted: 2019/11/07 14:44:47
by jlehtone
What is the filesystem on the volume? The default is XFS. It is not possible to shrink XFS.

With XFS you make a backup, create new and smaller volume, and restore to new volume.
With VM's you could possibly create new VM with "right size", copy data over, and then remove the original VM.