VMware VSAN delete/purge inaccessible objects

Sometimes it could happen, that you get inaccessible files on your ESXi Cluster with VSAN.
Here are the Steps to clean up inaccessible files with vCenter Server on Windows 2012R2:

Connect to vcenter server with rvc.bat in C:\Program Files\VMware\vCenter Server\rvc

login with administrator@vsphere.local@localhost:

C:\Program Files\VMware\vCenter Server\rvc>rvc.bat administrator@vsphere.local@localhost
 password:
 0 /
 1 localhost/
 >

Check command: vsan.check_state “pathToYourCluster”

> vsan.check_state /localhost/myDatacenter/computers/Cluster01/
 2016-07-14 07:34:49 +0200: Step 1: Check for inaccessible VSAN objects
 Detected 1 objects to be inaccessible
 Detected bf9c6a57-9cc3-d20c-ccb3-a0369f89ecac on 192.168.1.4 to be inaccessible

2016-07-14 07:34:50 +0200: Step 2: Check for invalid/inaccessible VMs

2016-07-14 07:34:50 +0200: Step 3: Check for VMs for which VC/hostd/vmx are out
 of sync
 Did not find VMs for which VC/hostd/vmx are out of sync

Delete inaccessible VSWP Objects command:
vsan.purge_inaccessible_vswp_objects /localhost/myDatacenter/computers/Cluster01/

vsan.purge_inaccessible_vswp_objects /localhost/myDatacenter/computers/Cluster01/
 2016-07-14 07:35:00 +0200: Collecting all inaccessible Virtual SAN objects...
 2016-07-14 07:35:00 +0200: Found 1 inaccessbile objects.
 2016-07-14 07:35:00 +0200: Selecting vswp objects from inaccessible objects by c
 hecking their extended attributes...
 2016-07-14 07:35:00 +0200: Found 0 inaccessible vswp objects.

Delete other inaccessible objects:
Connect to ESXi Server and issue the following command, which should show you the related objects:

/usr/lib/vmware/osfs/bin/objtool getAttr --bypassDom -u bf
9c6a57-9cc3-d20c-ccb3-a0369f89ecac -c

Check the output of the related object and make sure you can delete this file.

Delete the file with:

/usr/lib/vmware/osfs/bin/objtool delete -u bf9c6a57-9cc3-d
20c-ccb3-a0369f89ecac -f -v 10

Run check in vSphere Web Client on “Cluster” -> “Monitor” -> “Virtual SAN” -> “Health” -> Click on “Retest”.
Everything should be ok now.

Leave a Reply