Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
What version of esxi? –  Chopper3 Nov 14 '10 at 21:12
    
see subject :) 4.1 –  Luma Nov 14 '10 at 21:58
    
Have you tried it in maintenance mode? You mention that you put the server in maintenance mode, but then rebooted afterwards, presumably exiting form maintenance mode. You should be able to delete it, I've performed the procedure you've described a couple of times, and didn't have any problems. –  Jed Daniels Nov 14 '10 at 23:42
    
yes I tried from maintenance mode. Rebooting does not actually take an ESXi box out of Maintenance mode from my experience but even if it did I tried it. I tried so many things now this is getting frustrating. Thanks though as that is a good suggestion. –  Luma Nov 15 '10 at 4:14
add comment

2 Answers

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!

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.