2.25.2014

Reclaim Space using VMware VMFStools

Reclaim Space using VMware VMFStools

No NetApp Appliance
  1. Backup the VM
  2. Disable any Antivirus Services or not needed services to enhance performance of the installation
  3. Upgrade VMware Tools (requires reboot)
  4. Remove any snapshots of the VM
  5. Boot into Safe Mode (F8 or /SAFEBOOT switch using msconfig)
  6. Perform Scan Disk on the drive
  7. Perform Disk Defrag of the drive (Safe Mode, or using Bootable ISO utility best)
  8. Shutdown the VM
  9. Upgrade the VMware Hardware
  10. Run sdelete -z to zero out the free space (Microsoft sysinternals product)
  11. Shutdown the VM
  12. Run /usr/sbin/vmkfstools -K <VMname>.vmdk to punchout the zeros on the drive again using VMware tools. 
Note: ensure that you run this on every single VMDK that is part of the VM. Especially if it has multiple disks that has a dynamic spanned volume.

ls -alh VMname*.vmdk #this command can be used to see the provisioned space on the server
du -h VMName*.vmdk  #this command will show you the actual space that is being used by the VMDK
  1. vMotion over to a new data storage unit that has a different block size and choose Thin Provision and it should shrink and reclaim the zeroed space on the VM. 
  2. Re-align the VM's to match the block size of the VMFS-5 datastore for increased I/O performance using MBR tools.

ls –slh *.vmdk use this command BEFORE and AFTER to check the space

Go into the directory where the VMDK is located.

cd /vmfs/volumes/datastore/servername

Then run punchtool to zero out the free space.

/usr/sbin/vmkfstools -K servername.vmdk

Check to see if the size that is being reported as used is filled on the drive.

With NetApp Appliance
Right-Click and choose NetApp and then select reclaim space. The space will be reclaimed and then all is good to go.



No comments:

Post a Comment

Note: Only a member of this blog may post a comment.