VMware vSphere

 View Only
  • 1.  Reset host scratch locations

    Posted Mar 26, 2024 05:21 AM

    I'm trying to remove the only 2 datastores connected to a host so that I can set the host as a SPARE to use later in another cluster.

    Host is:
    VMware ESXi, 7.0.3, 21930508
    UCSB-B200-M4

    Cluster-level HA is turned off.
    Host \ Virtual Machines \ Swap File Location  = Virtual machine directory
    Host \ System \ Advanced System Settings \ Syslog.global.logDir  = [] /scratch/log
    Host \ System \ Advanced System Settings \ ScratchConfig.ConfiguredScratchLocation = /vmfs/volumes
    Host \ System \ Advanced System Settings \ ScratchConfig.CurrentScratchLocation = /vmfs/volumes

    I set these to /vmfs/volumes as I had no other datastores to store them on.

    When I try to unmount Datastore02, I get the error:

     

     

    The resource 'Datastore02' is in use.
    Cannot remove datastore 'Datastore02' because "local swap is enabled on it". Correct the problem and retry the operation.

     

     

    I'm not sure what else to try?

     

     

    [root@MyHost01:/vmfs/volumes/62e1d2e5-906ed05a-4270-01234567890] esxcfg-nas -l
    Datastore04 is /Datastore03/qt_0004 from 172.10.16.12 mounted available
    Datastore02 is /Datastore02/qt_0002 from 172.10.16.12 mounted available
    
    esxcfg-nas -d cmsinf_nfs_vmdata_t1000_pp_02
    NAS volume cmsinf_nfs_vmdata_t1000_pp_02 deleted.
    
    /etc/init.d/hostd restart
    /etc/init.d/vpxa restart
    
    esxcfg-nas -l
    Datastore04 is /Datastore03/qt_0004 from 172.10.16.12 mounted available
    
    reboot -f

     

     

    After rebooting the host, the deleted datastore is back!?

    I then try to unmount the last datastore Datastore04 however I get the error:

     

     

    Unmount NFS datastore failed!
    
    The resource 'cmsinf_nfs_vmdata_t1000_pp_04' is in use.

     

     

    How do I find where it is in use?

     

     



  • 2.  RE: Reset host scratch locations

    Posted Sep 09, 2024 10:13 AM

    @JDMils_Interact Did you ever resolve this issue?




  • 3.  RE: Reset host scratch locations

    Posted Sep 09, 2024 07:06 PM

    I did fix the issue. I tried the "esxcfg-nas -l" method above which did not work and I think I had to go into the VC DB to remove the datastore from vCenter. I don't remember the exact fix tho.