User talk:Lsamagana

How to shrink Linux VMDK using VMware Player or Workstation
How to shrink Linux VMDK using VMware Player/Workstation

Problem which I faced is:
I created a VM with 20 GB as its MAX Disk Space. VM created is thin provisioning by default.

Problem What I faced is once you keep on adding files to the VM the disk space increases (Expands), and when you delete the data from the VM the disk space doesn't shrink.

for example :


 * Max allocated Disk Space for the VM : 20GB
 * Disk Used after Installation : 4 GB
 * Disk Used after adding some data in VM : 17GB
 * Disk Used after deleting Some data in VM : 17GB ( deleted data is 10 GB)

The above data are with respect to your host OS on which your VM is running(in this case Windows).

My main goal is to copy the 7GB file to a Pen drive.

As you can see we have deleted 10GB of data from the VM and its said that VM created is Thin Provisioned, but still it says it has used 17GB. How can we shrink the VMDK?

So steps taken to do that.
open terminal and execute the below command
 * Power On the linux VM


 * sudo apt-get install secure-delete
 * sudo sfill /root

on another terminal run :


 * watch ls /root
 * watch df -h

press ctrl+c on the sfill terminal once u find that used disk space is 100%

power off the VM :
 * Go to VM setting -> harddisk -> utilities -> defragment.


 * Go to VM setting -> harddisk -> utilities -> compact.

Now see the properties of the vmdk from windows it would have actaully reduced to our requirement i.e., 7GB

Ref :
 * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638185


 * http://ubuntuforums.org/showthread.php?p=10104126


 * http://ubuntuincident.wordpress.com/2011/07/01/securely-delete-wipe/

This is what I did and it worked for me.