Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 183671

How to shrink thin guest on VMFS5? or change block size?

$
0
0

Hi all, I'm trying to find a way to shrink bloated thin-provisioned guests in an all VMFS5 environment.

 

We upgraded from 4.1 to 5.1 and then also storage vmotioned all of our vm's to newly created VMFS5 volumes before deleting the old VMFS3 volumes.  While doing this, everyone forgot that one of our volumes was intentionally set to a differnet block size than all the others for the purposes of shrinking guests that had ballooned up for whatever reason.  Now we have no way to create anything but a 1 MB block size volume which prevents us from doing the cleanup routine.  Is there any alternative way to shrink a guest that does not involve taking it offline?

 

For those not familiar with the procedure I'm describing, here's how it works:

 

Say you have a 100 GB guest that only has 10 GB of real data in it  but due to something having gone wrong, temporary files, clean-up of old data performed,  etc., that 100 GB had been used at one point by real files but is now only 10 GB in use. You would like to recover what is now 90 wasted gigs of space since your thin-provisioned VMDK is sitting there at 100 GB in size.  With VMFS3, you could create a volume with a  block size that was different than the volume the guest currently lives  on.   In our environment all of our LUN’s were 1 MB except for one we  kept at 2 MB just for this purpose.   When we were getting a bit low on  space and found guests like the one in question, we’d run a simple  command to write zeroes to all of the free space:

 

cat /dev/zero > bigfile ; rm -f bigfile

 

Then all you have to do is storage vMotion the guest to the 2 MB  volume and back to its normal home and suddenly the VMDK goes from 100  gigs down to 10 gigs, all without any impact on the guest.  Without support for creating a file system with a different block  size in VMFS5, now I am not aware of a way to reclaim this space in a manner that doesn’t  require an outage for the guest.


Viewing all articles
Browse latest Browse all 183671

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>