Reclaim Space using VMware VMFStools
No NetApp Appliance
- Backup the VM
- Disable any Antivirus Services or not needed services to enhance performance of the installation
- Upgrade VMware Tools (requires reboot)
- Remove any snapshots of the VM
- Boot into Safe Mode (F8 or /SAFEBOOT switch using msconfig)
- Perform Scan Disk on the drive
- Perform Disk Defrag of the drive (Safe Mode, or using Bootable ISO utility best)
- Shutdown the VM
- Upgrade the VMware Hardware
- Run sdelete -z to zero out the free space (Microsoft sysinternals product)
- Shutdown the VM
- 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
- 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.
- 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.