Hello,
I took delivery of a brand new Dell T430 server today. It came with 2 x SD Cards and a pre-configured RAID 6 (5 x 1.2TB drives).
ESXi had already been installed on the SD Card, so when I booted the server I logged into the web interface and added in my datastore. After creating the datastore and rebooting the server, I decided I wanted to change the partition layout of the datastore so decided to delete it. However when doing so, it said the datastore was in use.
From what i've read online, probably what happened is, when my datastore got created and the server rebooted, the scratch location changed from ramdisk to the datastore.
ESXi selects one of these scratch locations during startup in this order of preference:
The location configured in the /etc/vmware/locker.conf configuration file, set by the ScratchConfig.ConfiguredScratchLocation configuration option, as in this article.
1 A Fat16 filesystem of at least 4 GB on the Local Boot device.
2 A Fat16 filesystem of at least 4 GB on a Local device.
3 A VMFS datastore on a Local device, in a .locker/ directory.
4 A ramdisk at /tmp/scratch/.
I attempted to change the location of the datastore back to my SD card so I could temporarily delete the datastore and recreate, but every time I set the "ScratchConfig.ConfiguredScratchLocation" to either a path I created on the SD card (/scratch2) or "reset to default", after rebooting the server ESXi changed it back to the datastore location.
So I was wondering, in this scenario, how is it actually possible to change the scratch location and actually delete the datastore? Ideally there would be a way to tell esxi to use a RAMdisk again but I don't think this is possible.
What I ended up doing was initializing the RAID array again which deleted the datastore... but there has to be an easier way!
Cheers
Peter