I started the thread here Force Delete Partition - VMware Technology Network VMTN but figure this really should be an independent / thread.
Goal: Clean up orphaned objects so all vSAN errors are clear so I can upgrade disk to latest version of vSAN
I have a list of disk objects that are orphaned but I need to get better direction and root cause of how these objects are made, and when the issue is critical, vs just something to clear out.
I will use one orphan object on one host as example for thread, and build out workflow logic to remediate.
If there is a document and workflow to do this already: please direct me to it.
Example:
So object: d48fd262-e480-2ab0-5434-a0423f35e8ee
So starting with host which has absent object and disk. I did check that disk and it is listed as "healthy" so I figured I would see if I could map the object to "is it being used" , or is it just garbage orphaned and I can delete.
Tried to review all options for command "/usr/lib/vmware/osfs/bin/objtool" that are not destroy / create
####
getAttr Get attributes of an object
-W/--cid Container UUID
-u/--uuid UUID of the object
-c/--isComponent Specified uuid is a component uuid
-x/--diskUuid Disk uuid of the component
--bypassDom Bypass DOM and read from LSOM
-I/--snapId Snapshot ID (optional)
--format Pretty print the output
(Currently, only JSON)
getExtents Get extents information for a range of an object
-W/--cid <value> Optional container UUID.
-u/--uuid UUID of the object
-o/--offset Offset in bytes (or KB, MB, GB or TB)
-e/--length Length in bytes (or KB, MB, GB or TB)
-b/--strict Request exact extent information
-I/--snapshotId Optional snapshot ID.
-P/--physical Request the physical extents information
(Only for VSAN/ZDOM object)
getSnapshotDiff Get snapshot diff for a range of an object
-W/--cid <value> Optional container UUID.
-u/--uuid UUID of the object
-o/--offset Offset in bytes (or KB, MB, GB or TB)
-e/--length Length in bytes (or KB, MB, GB or TB)
-B/--firstSnapId Optional base snapshot ID.
-I/--snapId snapshot ID.
###
[root@odin:~] /usr/lib/vmware/osfs/bin/objtool getAttr -u 523c50be-adf7-575e-e5b6-84dba98e3365
Failed to get object attributes : No such file or directory 131076.
object getAttr error: Failure
[root@odin:~]
So not a great start to build out workflow.
Questions:
1) Are objects within context of vSAN a reflection of a "chunklet" of block object that is tagged with UUID, and then replication set / done against that object ID against a specific VM. vs where each object is a "block" / "chunklet" from total logical vSAN volume and not associated with any VM, as vSAN would be ignorant of the VM data placed within the chunklet / object. If it is based on VM vdisk, then can we query which "VM" that object was underpinning, so we could at least bind to which VM would be negativly effected if change made.
2) Are there any means to tag an object into "garbage" state, and then have vSAN do heath check and so remove an object within comfort that the if the object was under pinning something important, removal is now repaired and so just delete now that data has passed cleanup check.
PS:
As this is a home lab.. and I have backups.. I just figured what the heck, lets try to force delete one.. role the die and see how bad things happen.
Ex: d48fd262-6556-dfd7-a658-a0423f35e8ee also on same host "odin"
Before:
[root@odin:~] /usr/lib/vmware/osfs/bin/objtool delete -u d48fd262-6556-dfd7-a658-a0423f35e8ee -f -v10
[root@odin:~]
After:
So.. I guess we sit back and see who dies