Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Procedures for identifying Unassociated vSAN objects. (70726)

Last Updated: 10/9/2023Categories: How toTotal Views: 43807Language:
English

17 like this article

Subscribe to get an email
newsletter with new updates

17 people found this helpful Please provide article feedback:

Purpose

This article outlines what "Unassociated objects" are and procedures for identifying them so that they can be managed accordingly.

Cause

Unassociated does not necessarily mean unused/unneeded as any vSAN object that is not associated with a registered Virtual Machine will appear as 'Unassociated' when checked via RVC when using vsan.obj_status_report -t <pathToCluster> .

There are many instances of what gets classified as an Unassociated object but this doesn't mean the objects are unhealthy and should be removed, below are typical examples and not an exhaustive list:

Any VM data objects (e.g. namespace, vmdk, snapshot, vswap, vmem) of a VM that is not currently registered in vCenter inventory.

vSAN iSCSI target vmdk and namespace objects.

vSAN File Services root file system and shares.

Content Library namespace objects.

vSAN stats objects used for storing vSAN Performance data.

vswp objects belonging to some appliance e.g. NSX controllers, vRLI appliances and vROPS appliances.

AppVols

Replicated VMs in DR sites

VDI environments

Templates

Impact / Risks

Unused/unneeded unassociated objects can eat up valuable usable space on the vSAN datastore which could also result in the datastore filling up if not managed properly.

Resolution

Prior to performing any actions that could potentially cause loss of data such as deleting vSAN objects, care should always be taken to positively identify the Object(s) and confirm that they are not needed and are safe to delete.

Steps to identify unassociated objects:

1. Open an SSH session to the vCenter appliance
2. Log into RVC with "rvc localhost" if still using [email-masked] otherwise log in as rvc administrator@<domain>.local@localhost
3. Navigate to the vSAN cluster you want to check for unassociated objects like so

4. Get the list of unassociated objects by running "vsan.obj_status_report -t .", all Unassociated objects will be at the very end of the output.
5. Copy the list of the unassociated Object UUIDs like so

6. Open an SSH session to one of the ESXi hosts in the cluster and create a text file by doing the following:

run vi /tmp/unassoc.txt

Hit the "Insert" Key

Paste the output copied from step 5

Ensure the selected output from step 5 is pasted correctly, it should look similar to the above screenshot

If the pasted output looks correct then hit the "Esc" key followed by ":wq!" to save the file

7. Edit the file down to just a list of UUIDs by running the following command.
cat unassoc.txt | awk '{print $2}' | grep '^[0-9a-f]' >> /tmp/uuids.txt

8. Run the following command to generate a list of friendly names to UUIDs for review:

for i in `cat /tmp/uuids.txt`; do python -c "print('*' * 150)";/usr/lib/vmware/osfs/bin/objtool getAttr -u $i | grep -E 'UUID|friendly|class|Object path'; done > unassociated_objects.txt

Notes:

There are times when 100s or even 1000s of unassociated objects can be present so it's best to create a text file of the output and use an FTP client like WinSCP to pull the file down from the host for easier review.

Ensure to double/triple-check the list to ensure the unassociated objects can be safely deleted. It's critical to do this cause once the objects are deleted there is no getting them back and can lead to potential data loss if the wrong objects are deleted.

VMware is not able to advise on what data can be safely deleted, this is up to the owner of the data.

If there are any objects that shouldn't be deleted ensure to remove the UUIDs from the uuids.txt file

Once you have the file uuids.txt containing ONLY the UUIDs to be deleted, if you need assistance with options to delete these objects, engage vSAN support for assistance.

Identification can also be done via PowerCLI

Run the following PowerCLI script:

$clustername = "Cluster-01"
$clusterView = Get-Cluster $ClusterName
$ClusterMoRef = $Clusterview.ExtensionData.MoRef
$vmhost = ($clusterView | Get-VMHost) | select -First 1
$vsanIntSys = Get-View $vmhost.ExtensionData.configManager.vsanInternalSystem

$vsanClusterObjectSys = Get-VsanView -Id VsanObjectSystem-vsan-cluster-object-system
$results = (($vsanClusterObjectSys.VsanQueryObjectIdentities($clusterMoRef,$null,$null,$true,$true,$false)).Identities | where {$_.Vm -eq $null})

foreach ($result in $results) {
$jsonResult = ($vsanIntSys.GetVsanObjExtAttrs($result.Uuid)) | ConvertFrom-JSON
foreach ($object in $jsonResult | Get-Member) {
if($($object.Name) -ne "Equals" -and $($object.Name) -ne "GetHashCode" -and $($object.Name) -ne "GetType" -and $($object.Name) -ne "ToString") {
$objectID = $object.name
$jsonResult.$($objectID)
}
}
}

## Each Unassociated object will have the following structure:

UUID                : ca253f5c-a897-3421-73ec-246e96d1346a
Object type         : vsan
Object size         : 273804165120
User friendly name  : MGMT-VCG-02
HA metadata         : (null)
Allocation type     : Thin
Policy              : (("stripeWidth" i1) ("cacheReservation" i0) ("proportionalCapacity" (i0 i100)) ("hostFailuresToTolerate" i1) ("forceProvisioning" i0)
("spbmProfileId" "aa6d5a82-1c88-45da-85d3-3d74b91a5bad") ("spbmProfileGenerationNumber" l+0) ("objectVersion" i7) ("CSN" l72) ("SCSN" l76)
("spbmProfileName" "vSAN Default Storage Policy"))
Object class        : vmnamespace
Object capabilities : NONE
Object path         : /vmfs/volumes/vsan:522472d54b84dbad-15fdbdf65aa0fed0/MGMT-VCG-02
Group uuid          : 00000000-0000-0000-0000-000000000000
Container uuid      : 00000000-0000-0000-0000-000000000000

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-2 of 2

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSAN

Related Versions:

VMware vSAN 8.0.x

VMware vSAN 7.0.x

VMware vSAN 6.x

Take Our Survey

Support Assistant