VMware Cloud Community
DhileepRajendra
Contributor
Contributor

VSAN DiskGroup Name using JAVA

How to get the VSAN DiskGroup name in VSAN using JAVA ? The command for to get the disk group

in powercli is : Get-VsanDiskGroup -Cluster "cluster name" . But I couldn't find the relevant method in java. Please help me?

Disk Group.PNG

Reply
0 Kudos
6 Replies
RickVerstegen
Expert
Expert

Perhaps this can help you:

vSAN Management SDK for Java - VMware {code}

Was I helpful? Give a kudo for appreciation!
Blog: https://rickverstegen84.wordpress.com/
Twitter: https://twitter.com/verstegenrick
Reply
0 Kudos
DhileepRajendra
Contributor
Contributor

Hi

    I am actually using that SDK. But I couldn't find the relevant methods there. I can get the disk group UUID but I

couldn't get the Disk Group name. 

Reply
0 Kudos
TheBobkin
Champion
Champion

Hello DhileepRajendran

Can you specify what you are trying to achieve and why you would want to use the 'Disk-Group Name'?

FYI, it's not unique - look at the cluster in your screenshot (and same in my cluster here - 2 DGs on different nodes with the same 'name').

You are much better off using the 'VSAN Disk Group UUID' which is unique (which is the CMMDS UUID of the Disk-Groups cache-tier device).

Bob

Reply
0 Kudos
DhileepRajendra
Contributor
Contributor

Hi

   DiskGroup names are unique. I showed the diskgroup name from single Esxi host. Diskgroup in each host is unique. I want

the diskgroup name to display the disks in it (HDD and SSD) . I use diskgroup name as info and the disk in it were data.

Diskgroup UUID ( I already tried that before ) will not give clear picture. We don't know which diskgroup is it as in the web client.

Thanks

Reply
0 Kudos
TheBobkin
Champion
Champion

Hello Dhileep,

"DiskGroup names are unique. I showed the diskgroup name from single Esxi host."

So you have 2 DGs in a node and they have the same ID - that is not unique as you cannot distinguish between them.

"Diskgroup in each host is unique"

Anyway, it is not unique per node either:

pastedImage_0.png

I am positing it may be based on whether the DGs were created/edited at same time (e.g. cluster creation or auto-claim on a newly added node) or individually or it could be something else.

"We don't know which diskgroup is it as in the web client"

What's the issue with referencing the naa or other unique ID of the cache/capacity-tier devices to distinguish between DGs?

Bob

Reply
0 Kudos
DhileepRajendra
Contributor
Contributor

Hi Bob

   Yeah you are right. I am going with UUID. Because we thought before,  UUID alone will not give clear picture.

Because in the web client they show the diskgroup with name not with UUID. So we tried a lot to get the disk group name.

We got that in powercli but we couldn't get it in JAVA SDK. Anyway now we are going with UUID.

Thanks a lot

Regards

Dhileepan Rajendran

Reply
0 Kudos