I have an ESXi server that uses local SATAII disks.
3 datastores.
I have moved all VM's over to the second datastore and there is nothing left on the first datastore.
I removed all VM's from inventory after shutting them down, put server into maintenance mode, rebooted and then attempted to deleted the datastore and I still get the error that the datastore is in use.
I had a look using ssh and on the datastore there is a .locker folder and then 5 .sf files.
any ideas how I can format this datastore?
thanks.
ESXi automatically creates the first datastore and stores some hidden files/folders for different things like HA and logs.
The only way I've been successful in deleting it is to boot the host with a gparted live cd, and delete the partition. Afterwards ESXi will find a new place for it's files and you can add a new datastore with the 8MB block size.
Standard disclaimer: WARNING. REMOVING A PARTITION WILL DELETE ANY VMS ON THAT DATASTORE. BACK STUFF UP.
Good luck!
I just did this recently.
Use the vSphere Client interface to work with the datastores. Delete the datastore using the graphical interface, then use "Add Storage" to add a new datastore. You don't have to be in maintenance mode to do this.
Beyond that, I don't know. In my case, the datastore was never used, so I didn't have the problem you're having.