Shrink root Volume

General support questions
Post Reply
NuwanthaD
Posts: 4
Joined: 2019/05/21 09:32:14

Shrink root Volume

Post by NuwanthaD » 2019/11/07 12:36:29

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,

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Shrink root Volume

Post by TrevorH » 2019/11/07 14:41:11

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

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

Re: Shrink root Volume

Post by jlehtone » 2019/11/07 14:44:47

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.

Post Reply