My VMWare Lab that I run hosts several guest servers. The main storage for guest operating systems is on RAID consisting of 6 SAS 300GB drives. For mass storage, there are 2x 4TB SATA drives. Since VMWare does not support “Software RAID” these 2x SATA drives are just installed as normal drives and I set them up as individual data stores. Hence there is no redundancy. One of those drives started to show signs of failure so I went to replace it. While trying to unmount the drive VMWare kept saying the datastore was in use, even though I had migrated all VMDKs off to the other data store.
Then I found that the scratch partition was on this datastore that I as trying to umount…this is the point of this lab, for me to learn this stuff.
I followed these steps below to move the scratch partition to one of the other datastores.
Configuring a persistent scratch location using the VMware Host Client for ESXi 6.5
- Connect to ESXi host using Host Client.
- Click Storage.
- Right-click a datastore and click Browse.
- Create a uniquely-named directory for this ESXi host.For example:
- Close the Datastore Browser.
- Click the Manage tab
- Under System, click Advanced System Settings.The setting ScratchConfig.CurrentScratchLocation shows the current location of the scratch partition.
- In the ScratchConfig.ConfiguredScratchLocation field, enter a directory path that is unique for this host.For example, /vmfs/volumes/DatastoreUUID/.locker-ESXHostname.
- Reboot the host.