How Reclaim Space from SAN Storage- Vmware VMFS-5 Unmap Issue.
If you have created a thin datastore (SAN) using VMFS5 in your vmware cloud environment you have to face this issue. We call this storage UNMAP issue. In this case, deleted space from vCenter Datastore will not be reduced from SAN Storage end. This can lead storage down, if you monitor storage utilization only from vCenter end. So, if you have a vmware cloud which meet these conditions, you must keep in touch about utilization from storage end otherwise you have to face a complete cloud outage. But we have an option to claim this space from storage if only below requirement is supported by storage. Usually modern SAN Storage devices support this.
Storage device must support vaai & lets see how to check vaai status.
Access vmware vCenter
Enable SSH of one of a host which relevant datastore is added (Relevant datastore from storage must be available to host)
SSH to the host & access it using root credentials of the host
Check available datastores to the host using df -h command
Now note down file system, datastore name & used space. File system should be VMFS5 & there should be clear difference between datastore & relevant LUN of storage device
Now you need to find out naa.id of datastore & use following command
esxcli storage vmfs extent list
Now you need to get vaai support status using following command. You can see few lines as output & status must be as ‘supported’ for all of them.
esxcli storage core device vaai status get -d naa ID
Once you make sure that it is supported & can be claimed space from storage, run following command.
esxcli storage vmfs unmap -l datastorename
Please note that this will take few hours as per space need to be claimed. Remember that you are unable to run any command on relevant host till complete this command.
Once command is completed, you can try to type command & you can verify storage utilization from both vCenter & Storage end. Utilization must be same.