Shrinking overprovisioned thin disks

Posted on

Shrinking overprovisioned thin disks – A server stack is the collection of software that forms the operational infrastructure on a given machine. In a computing context, a stack is an ordered pile. A server stack is one type of solution stack — an ordered selection of software that makes it possible to complete a particular task. Like in this post about Shrinking overprovisioned thin disks was one problem in server stack that need for a solution. Below are some tips in manage your linux server when you find problem about linux, vmware-esxi, vmware-vsphere, thin-provisioning, shrink.

We have a VCenter with some data storages, one of them is 10 TB. The issue is that the former sysadmins created many VM’s with thin provisioned disks of 8 TB. Right now, the provisioned storage is close to 100 TB and the real used space is below 100 GB on each server.

What is the best way to follow here to fix those VM’s? All of them are Linux (Ubuntu or CentOS). The 8 TB is the root partition.

Thank you.

The problem is shrinking filesystems can lead to highly inefficient filesystems (see the warning in https://ext4.wiki.kernel.org/index.php/Ext4_VM_Images#Shrinking_an_FS_to_Minimal_Size ) and that’s assuming you’re not using a filesystem such as XFS which doesn’t support shrinking. Your best bet is a backup and restore of the data to a smaller filesystem on a backing disk of the correct size (thin or otherwise).

If at all possible I’d recommend buying more disks so you have more storage though. You’ll spend a lot of time trying to shrink everything and if you can trade money for time…

Clone or rebuild new VMs with a reasonable storage allocation. Cut over to them at the next maintenance window of the applications affected.

Sometimes limitations in the storage stack mean you cannot reduce existing volumes. Such as an XFS file system. In which case, do a file level backup restore.

Leave a Reply

Your email address will not be published. Required fields are marked *