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
Forum Moderator
Posts: 26942
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.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 2383
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

Return to “CentOS 7 - General Support”