The VDQ Command
Why is it useful?
The vdq command, shown below is a command line utility found on esxi hosts version 6 that informs the administrator if a specific disk is available to VSANs. When used with the "-q" option, it displays every disk found, its name, its vsan uuid and why it may be inelegible for vsans. If so, it provides a reason for it.
How to use it?
1. Notice the version of esxi below.
[root@esxi01:~] esxcli system version get
Product: VMware ESXi
Version: 6.0.0
Build: Releasebuild-2494585
Update: 0
Patch: 0
2. Run it without any options to see the available flags or use the "-h" option for help.
[root@esxi01:~] vdq
usage: vdq <cmd> <options>
commands:
-h|--help Output usage.
-q|--query Query all disks for eligibility for VSAN usage.
May be used with --devices to limit the query to
only those devices.
-i|--info Dump out known VSAN disk mappings.
-s|--stamp Read 512 bytes of the given device and output its
contents as though it were stamped with a current
valid VSAN_Metadata.
When used, vdq will return 0 if there is confidence
that the read stamping is sane (has a valid checksum
value).
options:
-H|--human Emit human-readable output (default output Python).
-d|--devices <devNames> Used to specify devices for use with --query. For
these, devices names should be formatted as the
so-called SCSI disk canonical name.
Example: "mpx.vmhba2:C0:T0:L0"
Multiple devices may be specified by delimiting them
with ",".
Example: "mpx.vmhba2:C0:T0:L0,mpx.vmhba2:C0:T1:L0"
-v|--verbose Emit verbose information to stderr.
3. Execute it with the "-q" option to view all the disks available and related information.
[root@esxi01:~] vdq -q
[
{
"Name" : "eui.68162383505096af",
"VSANUUID" : "",
"State" : "Ineligible for use by VSAN",
"ChecksumSupport": "0",
"Reason" : "Has partitions",
"IsSSD" : "0",
"IsCapacityFlash": "0",
"IsPDL" : "0",
},
{
"Name" : "eui.b0465b2d00000000",
"VSANUUID" : "",
"State" : "Ineligible for use by VSAN",
"ChecksumSupport": "0",
"Reason" : "Non-local disk",
"IsSSD" : "0",
"IsCapacityFlash": "0",
"IsPDL" : "0",
},
{
"Name" : "eui.28cc9920557ad9d5",
"VSANUUID" : "",
"State" : "Ineligible for use by VSAN",
"ChecksumSupport": "0",
"Reason" : "Has partitions",
"IsSSD" : "0",
"IsCapacityFlash": "0",
"IsPDL" : "0",
},
4. Execute the command with the "-q" and "-d" option to view the attributes of a specific disk.
[root@esxi01:~] vdq -q -d mpx.vmhba1:C0:T0:L0
[
{
"Name" : "mpx.vmhba1:C0:T0:L0",
"VSANUUID" : "",
"State" : "Ineligible for use by VSAN",
"ChecksumSupport": "0",
"Reason" : "Has partitions",
"IsSSD" : "1",
"IsCapacityFlash": "0",
"IsPDL" : "0",
},
Final Note: "IsSSD =1" = yes "IsSSD=0" = no