Introduction
In this short blog we will show how to get the counts of vSAN objects and components. This can be useful to see which components are causing a issue when you almost hit the limit.
Limits
vSAN OSA has a components limit of 9000 per host.
vSAN ESA has a components limit of 27000 per host.
Limits can be reached for example with large VM’s or VCDA protection replications.
Getting the component count
First we need to start a SSH session to our vCenter.
1. Start a SSH session to the vCenter.
2. Login with “root”.
3. Now we run the following command:
rvc 127.0.0.1
4. Now fill in the password of “administrator@vsphere.local”
5. Once it is loaded you will see the following:
0 /
1 127.0.0.1/
If you don’t see this use the following command:
ls
6. We want to go to the localhost (127.0.0.1). This can be a different number for you. For me it is number 1, so I will type the following:
cd 1
7. Once we are in the localhost we can type the following to show the directories:
ls
8. Here we will see all the datacenters. Choose the correct datacenter. For me it is number 0, so I type the following:
cd 0
9. Again we will show the directories by typing:
ls
10. Here we will see different directories. In our case we need the computers [host] directory. For me it is number 1. So I will type the following:
cd 1
11. Again we will show the directories by typing:
ls
12. Here we can see all our clusters. Choose the cluster you want to see the objects and components of. For me this is number 8 so I will type the following:
cd 8
13. We should now be at:
/127.0.0.1/t01pz03-s01-dc01/computers/t01pz03-s01-cl09
14. This is the location we need to be in. Now we run the following command:
vsan.obj_status_report . -t
15. This command will show us all the objects and the components. The results will look something like:
2024-12-03 12:18:22 +0100: Querying all VMs on vSAN ...
2024-12-03 12:18:24 +0100: Querying DOM_OBJECT in the system from h001.demo.dashcenter.blog ...
2024-12-03 12:18:24 +0100: Querying DOM_OBJECT in the system from h002.demo.dashcenter.blog ...
2024-12-03 12:18:25 +0100: Querying DOM_OBJECT in the system from h003.demo.dashcenter.blog ...
2024-12-03 12:18:25 +0100: Querying DOM_OBJECT in the system from h004.demo.dashcenter.blog ...
2024-12-03 12:18:26 +0100: Querying DOM_OBJECT in the system from h005.demo.dashcenter.blog ...
2024-12-03 12:18:26 +0100: Querying DOM_OBJECT in the system from h006.demo.dashcenter.blog ...
2024-12-03 12:18:26 +0100: Querying DOM_OBJECT in the system from h007.demo.dashcenter.blog ...
2024-12-03 12:18:27 +0100: Querying DOM_OBJECT in the system from h008.demo.dashcenter.blog ...
2024-12-03 12:18:27 +0100: Querying DOM_OBJECT in the system from h009.demo.dashcenter.blog ...
2024-12-03 12:18:28 +0100: Querying all disks in the system from h010.demo.dashcenter.blog ...
2024-12-03 12:18:30 +0100: Querying all object versions in the system ...
/opt/vmware/rvc/lib/rvc/lib/vsanupgrade.rb:1052: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
2024-12-03 12:18:35 +0100: Got all the info, computing table ...
Histogram of component health for non-orphaned objects
+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
| 4/4 (OK) | 203 |
| 3/3 (OK) | 8640 |
| 8/8 (OK) | 111 |
| 24/24 (OK) | 1 |
| 16/16 (OK) | 8 |
| 5/5 (OK) | 104 |
| 9/9 (OK) | 6 |
| 7/7 (OK) | 4 |
| 10/10 (OK) | 18 |
| 6/6 (OK) | 21 |
| 26/26 (OK) | 1 |
| 32/32 (OK) | 1 |
| 36/36 (OK) | 12 |
| 76/76 (OK) | 1 |
+-------------------------------------+------------------------------+
Total non-orphans: 9131
Histogram of component health for possibly orphaned objects
+-------------------------------------+------------------------------+
| Num Healthy Comps / Total Num Comps | Num objects with such status |
+-------------------------------------+------------------------------+
+-------------------------------------+------------------------------+
Total orphans: 0
Total v19 objects: 22290
+-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| VM/Object | objects | num healthy / total comps |
+-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+
| *********-7CNs | 2 | |
| [*********-vsan01] 53101667-5cb7-0132-e6fb-78ac44b55210/*********-7CNs.vmx | | 3/3 |
| [*********-vsan01] 53101667-5cb7-0132-e6fb-78ac44b55210/*********-7CNs.vmdk | | 3/3 |
| *********-pTVE | 1 | |
| [*********-vsan01] b9741667-1899-cc2b-84fe-78ac44b57670/*********-pTVE.vmx | | 3/3 |
| *********-6M5Z | 1 | |
| [*********-vsan01] 52981767-f422-12a4-e270-78ac44b55210/*********-6M5Z-28c9bcf8.vswp | | 3/3 |
| *********-UBx2 | 2 | |
| [*********-vsan01] 13991767-5c15-63e5-3c9a-78ac44b57670/*********-UBx2.vmdk | | 3/3 |
| [*********-vsan01] 13991767-5c15-63e5-3c9a-78ac44b57670/*********-UBx2-c623421f.vswp | | 3/3 |
| *********-Uavb | 2 | |
+-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+ +-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+ | Secondary namespaces | 1 | | +-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+ | Unassociated objects | 8058 | | | e1e84e67-f4a9-2100-67e9-78ac44b7e060 | | 4/4 | | 72bd4d67-e81f-6300-137e-78ac44b7e060 | | 8/8 | | 0eda4d67-0625-b200-448f-78ac44b7e060 | | 3/3 | | 37be4d67-3483-b200-a52b-78ac44b7e060 | | 3/3 | | beaf4d67-3eb4-3c01-bdba-78ac44b7e060 | | 3/3 | | d9e84e67-aa76-5101-cb8e-78ac44b7e060 | | 3/3 | | d8824e67-ca7a-a301-3052-78ac44b7e060 | | 3/3 | | f0114e67-1e94-d601-4401-78ac44b54fb0 | | 3/3 | | 7dc94e67-9471-5d02-27a6-78ac44b7e060 | | 3/3 | | 71bd4d67-d6db-7702-e122-78ac44b57670 | | 3/3 | | b4204e67-36e4-7a02-4c0d-78ac44b7e060 | | 3/3 | | cd9e4e67-0697-8202-9af3-78ac44b57670 | | 3/3 | | cdbd4d67-d206-ab02-ab73-78ac44b80710 | | 3/3 | | d8cb4d67-e8ff-de02-33dc-78ac44b7e060 | | 3/3 | +-------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------------+ WARNING: Unassociated does NOT necessarily mean unused/unneeded. Deleting unassociated objects may cause data loss!!! You must read the following KB before you delete any unassociated objects!!! https://kb.vmware.com/s/article/70726 +------------------------------------------------------------------+ | Legend: * = all unhealthy comps were deleted (disks present) | | - = some unhealthy comps deleted, some not or can't tell | | no symbol = We cannot conclude any comps were deleted | +------------------------------------------------------------------+
I have shorten the output because it was to long, but this should give you a better understanding of the output.