After re-installing the OS on the vSAN nodes, the disk groups are showing as unhealthy.
By navigating to vSAN cluster > Configure > vSAN > Disk Management, we see the disk group status as below:
VMware vSAN (All Versions)
This can happen if the hosts are not part of the vSAN cluster.
The same can be verified by running the below command:
[root@hostname:~] esxcli vsan cluster get
vSAN Clustering is not enabled on this host
Add these hosts to the existing vSAN cluster by using the below command:
esxcli vsan cluster join -u sub_cluster_UUID
Refer below kb article for more information on how to add a host to vSAN cluster:
How to add a host back to a vSAN cluster after an ESXi host rebuild/reimage