vSAN Objects Inaccessible

While building out a new vSAN Cluster, I received an error for the vSAN object health. I clicked the “Repair Objects Immediately” button, and it thought about it for a minute – but ultimately it was a wasted effort. The “Purge Inaccessible VM Swap Objects” button was up next. But unfortunately, like its partner, it also returned with no resolution.

vsan objects inaccessible
vSAN Object Health is not happy

From what I have been able to gather on the web, these objects can potentially be .vswp objects that are generated when VM’s are powered on, and are safe to delete. The first step is to get into the RVC and see what we’re working with:

Command> rvc administrator@vsphere.local:[password]@localhost

cd 0
cd 1
ls

At this point you should you should see your cluster name available. Run the following command which will check and refresh objects, and then list any inaccessible objects.

vsan.check_state -r [cluster name]
vsan objects inaccessible

Now we can attempt to purge the inaccessible object that was found:

vsan.purge_inaccessible_vswp_objects [cluster name]  
vsan objects inaccessible

It was unable to purge the objects (sad face). But this will not deter us, we will succeed in purging the object! Let’s head over to the console again. Now this next snippet needs to be run on the owner host node(s) of the object. This was a small cluster (4 node) so I could check all of them manually with minimal effort. However, if this was a larger cluster it would be worth running a query to determine the owner nodes.

/usr/lib/vmware/osfs/bin/objtool getAttr --bypassDom -u 6d747759-1e15-10c6-a1d8-107d1a577dc1
vsan objects inaccessible

And finally, we can run this command to delete the object. If successful, there will be no output.

/usr/lib/vmware/osfs/bin/objtool delete -u 6d747759-1e15-10c6-a1d8-107d1a577dc1 -f -v 10

Alright! Let’s re-test that cluster health again.

vsan objects inaccessible
It’s Green now!

Success! There are no more objects in a state of “Inaccessible” and the vSAN object health alarm is back to green.

Leave a Reply

Your email address will not be published. Required fields are marked *