HI.
Is there any way to shink a thin provisioned vmdk?
We have some machines (Linux ext3 and Windows NTFS) where disk space was temporarily being used for a migration process and now the vmdk's are rather big although the temp files have been deleted. I assume doing a vmkfstools -i is not enough but there also must something being done on the guest OS level.
Thanks for any suggestions.
Cheers.
goppi
You can use sysinternals sdelete program to write zeroes to deleted files in windows: http://communities.vmware.com/message/537387
For linux the best options seems to be to "dd" zeroes to fill up all available space and then remove the file, example: http://communities.vmware.com/message/219433
Hope it helps!
Thanks for your answer.
I will report back after I've tried (and assign points of course )
Zero-out by itself is not enough. You will also need to storage vmotion the VM after the zero-out to shrink the VMDK.
Duncan
VMware Communities User Moderator | VCP | VCDX
-
Now available: Paper - vSphere 4.0 Quick Start Guide: Shortcuts down the path of Virtualization | PDF
I suspect that vmkfstools -i instead of storage vmotion will also do the job?
But with vMotion you doesn't need to shutdown the guest...
AWo
\[:o]===\[o:]
=Would you like to have this posting as a ringtone on your cell phone?=
=Send "Posting" to 911 for only $999999,99!=
@dnetz:
The tip for Windows was a good one. It did the trick.
The linux one however wasn't optimal.
On one box it reduced the size from 18 GB to 6 GB on another one it increased the size from 4 to 6 whereas only 2 GB were used by the filesystem.
So the question remaining is:
Is there anything to optimize the result for linux machines?
Thanks.
Regards.
Have you tried the shrink option from the VMWare Tools, already? You need to have X running for Linux to start the VMware Tools toolbox.
That writes zeroes in the unused space and clones that into a new disk leaving the zeroed areas (renamin etc. is all done automatically). So from the VMware perspective it seems that "some" kind of disk cloning is needed as the VMware Tools themself work this way.
AWo
\[:o]===\[o:]
=Would you like to have this posting as a ringtone on your cell phone?=
=Send "Posting" to 911 for only $999999,99!=
@AWo:
Thanks for that tip. However all servers we are running don't have X installed. Is there any way to trigger this from the command line? Come on we are on linux :smileylaugh:
Cheers,
goppi.
No , except....................................................................................................
.......................................................................................................................
.......................................................................................................................
Storage VMotion. That works even without the VMware Tools.
Why don't you use that?
AWo
\[:o]===\[o:]
=Would you like to have this posting as a ringtone on your cell phone?=
=Send "Posting" to 911 for only $999999,99!=
@AWo:
Storage VMotion is not an option for that customer because of licensing reasons.
Still misterious why shrinking NTFS works quite well compared to ext.
Thanks anyway.
Regards,
goppi.
must be a better way to do this...
will the zero filling max out my thin vmdk file (and fill my datastore)?