An ESXi datastore that has been in Maintenance Mode for an extended period cannot be unmounted from the hosts it is mapped to. Attempts to unmount or delete the datastore fail with an error similar to:
Device or Resource BusyThe resource 'Datastore Name: [Name]' is in use... because 'file system is busy'.Environment Details:
Syslog.global.logDir advanced system setting has already been verified to point to a different location.ESXi all version
The datastore remains locked because it is still defined as the persistent scratch location (ScratchConfig.ConfiguredScratchLocation) for one or more ESXi hosts.
Unlike syslog configuration changes, updating the scratch location is a static configuration that creates a persistent pointer. The VMkernel maintains an exclusive file lock on the VMFS volume as long as it is the active scratch target. This lock is only released when a new location is initialized during the host boot sequence.
To resolve this issue, the scratch location must be reconfigured to a new datastore and the ESXi host must be rebooted to release the lock.
/vmfs/volumes/New_Datastore/HostA_Scratch).ScratchConfig.ConfiguredScratchLocation.ScratchConfig.CurrentScratchLocation reflects the new path.