1

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.

gsantovena
  • 316
  • 2
  • 8
  • As a general rule I'd clone the VM with any of a handful of tools - those that actually create a new VM like Carbonite Move or VMware converter - and create the destination disks with accurate sizes. – Tim Brigham May 05 '18 at 02:34

2 Answers2

2

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

Anon
  • 1,210
  • 10
  • 23
1

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.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32