vSAN Storage not connected and ESXi Hosts Stuck in vSAN Maintenance Mode After Power Outage
search cancel

vSAN Storage not connected and ESXi Hosts Stuck in vSAN Maintenance Mode After Power Outage

book

Article ID: 435033

calendar_today

Updated On:

Products

VMware vSAN

Issue/Introduction

VMware vSAN datastore is inaccessible and ESXi Hosts Stuck in vSAN Maintenance Mode following an unexpected cluster power outage .

Attempts to transition the affected ESXi hosts out of maintenance mode time out or hang indefinitely. Standard clearance commands using esxcli and localcli fail to clear the state.

Querying the ESXi Config Store via configstorecli config current get -c vsan -g system -k host_state reveals that the decom_mode and decom_state attributes are active and not set to NONE.

Environment

VMware vSAN 8.x 
VMware vSAN 9.x

Cause

The ESXi Config Store contains stale vSAN decommission metadata. This persistent configuration mismatch deadlocks the ESXi management agents, preventing the vSAN kernel from properly exiting maintenance mode after an unexpected power loss.

Resolution

  1. Export the current vSAN host state configuration to a temporary JSON file: /bin/configstorecli config current get -c vsan -g system -k host_state -outfile tmp.json

  2. Open the tmp.json file using a text editor, such as vi.

  3. Locate the decommission attributes and modify them to reflect a healthy, non-maintenance state:

     
    "decom_mode": "NONE",
    "decom_state": "NONE",
    "decom_version": 0,
    
  4. Save the changes and import the modified JSON file back into the Config Store to overwrite the stale configuration: /bin/configstorecli config current set -c vsan -g system -k host_state -infile tmp.json

  5. Restart the hostd management agent to synchronize it with the updated Config Store database: /etc/init.d/hostd restart

  6. Verify the host has successfully exited vSAN maintenance mode and datastore access is restored.