VMware – Can’t unmount/remove datastore – in use or file system is busy
i going through doing some upgrade of VMFS5.xx to VMFS6 on the customers datastores. The scenario is the same for each customer – upgrade VCSA, firmware on hosts, ESXi nodes and upgrade VMFS to latest 6.0, which was introduced with vSphere 6.5.
The most time-consuming part is lates part of ugrade… you cannot upgrade VMFS 5.xx directly to VMFS 6, so you need migrate all VMs from datastore to the temporary datastore, unmount and remove old VMFS 5.xx datastore, create a new, format it as VMFS 6 and migrate all VMs back from temporary datastore.
Issues where i faced:
- Snapshots ! – if the VMs is stored on temporary datastore and you still see it on „old datastore“ check the snapshots
- CD/DVD – connected datastore .iso file – if the VMs is stored on temporary datastore and you still see it on „old datastore“ check the settings of VM and disconnect datastore .iso file.
- Check the TEMPLATES !
- So now, you have the clean VMFS 5.xx datastore from VMs… but, is possible, that your hosts uses this datastore for the syslog storage (my case) in this situation you still cannot remove it.
If you need know, which files are open (locked) for selected host follow this:
[root@node-ESX1:~] esxcli storage vmfs extent list Volume Name VMFS UUID Extent Number Device Name Partition -------------- ----------------------------------- ------------- ------------------------------------ --------- SAS15k 51b1efb0-f363b5ca-c531-001999fe9e50 0 naa.60060e80105edef00570767f00000000 1 SAS10k_2 51b1efe7-ac05f7b0-d13c-001999fe9e50 0 naa.60060e80105edef00570767f00000002 1 DS3024 57359a33-f36e1873-be63-001999e2ec20 0 naa.600d0231000510046bc88b8a70ed3e0b 1 DS3024_migrace 590198d2-fe5180b5-5e93-901b0ece4fa8 0 naa.600d0231000510045ceea8105ac5b08e 1 SAS10k_1 59085eab-2fd94289-1b33-901b0ece4fa8 0 naa.60060e80105edef00570767f00000001 1
log into esxi host via putty and run command to see all vmfs datastores, copy UUID of your datastore, which you need remove – in my case 51b1efd0-2a266292-b8a7-001999fe9e50
lsof | grep 51b1efd0-2a266292-b8a7-001999fe9e50
and use „lsof“ command – to see, which files are open – in my case it was the syslog folder (Syslog.global.LogDir) for ESXi host, after change it in advanced settings of ESXi i finally removed the datastore !
How to change Syslog.global.LogDir on ESXi 6.5 via CLI