Hello vCommunity,

Here is a simple script with a set of vSAN related options for troubleshooting and information gathering.

More options will be added as the new vsantool.sh versions come out.

Regular Script

[[email protected]:~] sh vsantool.sh

Script :  GitHub vsantool.sh

Output

+------------------------------------------------------+
|                         vsantool                     |
+======================================================+
| 1) VSAN Cluster State                                |
| 2) Validate if the vSAN is communicating with other  |
|               vsan members                           |
| 3) Check on the vSAN objects' state                  |
| 4) Check VSAN's disks                                |
|    (Device/CMMDS state/Dedup/Compression)            |
| 5) Verify for running resync operations              |
| 6) Check disk balance status on all hosts            |
| 7) Look for SSD congestion                           |
| 8) Print data limit health status                    |
| 9) Print physical disks health status                |
| 10) Print perf service health status                 |
| 11) Is this Node part of a stretched cluster?        |
| 12) Check for 4K alignment                           |
| 13) How many objects each host owns                  |
| 14) Find accessible object paths                     |
| 15) Find inaccessible objects                        |
| 16) Check for checksum errors                        |
| q)   Quit                                            |
+------------------------------------------------------+

Examples:

1
=============VSAN Cluster State==============
Cluster Information
   Enabled: true
   Current Local Time: 2020-08-17T00:23:23Z
   Local Node UUID: 5e69c128-a23d-ed94-dd7c-e4434b18d264
   Local Node Type: NORMAL
   Local Node State: AGENT
   Local Node Health State: HEALTHY
   Sub-Cluster Master UUID: 5e69bf82-ff88-095c-8daa-e4434b12dd68
   Sub-Cluster Backup UUID: 5e69c1c3-58e2-ff68-3f02-e4434b18d1d4
   Sub-Cluster UUID: 52712aaa-3c34-fcf8-7ff2-6b4a11f24801
   Sub-Cluster Membership Entry Revision: 3
   Sub-Cluster Member Count: 4
   Sub-Cluster Member UUIDs: 5e69bf82-ff88-095c-8daa-e4434b12dd68, 5e69c1c3-58e2-ff68-3f02-e4434b18d1d4, 5e69bf6c-6734-4bb6-9720-e4434b18cea0, 5e69c128-a23d-ed94-dd7c-e4434b18d264
   Sub-Cluster Member HostNames: jortech-node01.local, jortech-node02.local, jortech-node03.local, jortech-node01.local
   Sub-Cluster Membership UUID: 3573315f-decf-5b3b-7acf-e4434b12dd68
   Unicast Mode Enabled: true
   Maintenance Mode State: OFF
   Config Generation: 006b72a7-cd79-4d4c-8084-eca3a209cb97 6 2020-08-11T18:06:15.951

Here is the overall vSAN cluster health:

Health Test Name                                    Status
--------------------------------------------------  -----------------------------
Overall health                                      yellow (Cluster health issue)
Cluster                                             yellow
  ESXi vSAN Health service installation             green
  vSAN Health Service up-to-date                    green
  Advanced vSAN configuration in sync               green
  vSAN daemon liveness                              green
  vSAN Disk Balance                                 yellow
  Resync operations throttling                      green
  Software version compatibility                    green
  Disk format version                               green
Network                                             green
  Hosts with connectivity issues                    green
  vSAN cluster partition                            green
  All hosts have a vSAN vmknic configured           green
  vSAN: Basic (unicast) connectivity check          green
  vSAN: MTU check (ping with large packet size)     green
  vMotion: Basic (unicast) connectivity check       green
  vMotion: MTU check (ping with large packet size)  green
  Network latency check                             green
Physical disk                                       green
  Operation health                                  green
  Disk capacity                                     green
  Congestion                                        green
  Component limit health                            green
  Component metadata health                         green
  Memory pools (heaps)                              green
  Memory pools (slabs)                              green
Data                                                green
  vSAN object health                                green
Capacity utilization                                green
  Disk space                                        green
  Read cache reservations                           green
  Component                                         green
  What if the most consumed host fails              green
Performance service                                 green
  Stats DB object                                   green
  Stats master election                             green
  Performance data collection                       green
  All hosts contributing stats                      green
  Stats DB object conflicts                         green
=============================================

7
=============Look for SSD congestion==============

Any value greater than 150 requires to be investigated

520243a4-8bb7-c95a-a6e9-28655e26febd
   memCongestion:0
   slabCongestion:0
   ssdCongestion:0
   iopsCongestion:0
   logCongestion:0
   compCongestion:0
   memCongestionLocalMax:0
   slabCongestionLocalMax:0
   ssdCongestionLocalMax:0
   iopsCongestionLocalMax:0
   logCongestionLocalMax:0
   compCongestionLocalMax:0
52f0561b-e656-8f9a-17da-adb120a1544a
   memCongestion:0
   slabCongestion:0
   ssdCongestion:0
   iopsCongestion:0
   logCongestion:0
   compCongestion:0
   memCongestionLocalMax:0
   slabCongestionLocalMax:0
   ssdCongestionLocalMax:0
   iopsCongestionLocalMax:0
   logCongestionLocalMax:0
   compCongestionLocalMax:0
==================================================

5
=============Resync Operations==============


   Total Number Of Resyncing Objects: 0
   Total Bytes Left To Resync: 0
   Total GB Left To Resync: 0.00

============================================

Here is the GitHub access to these scripts

Make sure to review the VMware Scripting Series to find more useful content.

Jorluis

Buy me a coffeeBuy me a coffee