查询主机vsan 磁盘
[root@esxi81:~] esxcli vsan storage list
t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Device: t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Display Name: t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Is SSD: false
VSAN UUID: 525ea6a3-4652-a155-776e-8f4d58b76918
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 4109026058915579745
Checksum OK: true
Emulated DIX/DIF Enabled: false
t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Device: t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Display Name: t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Is SSD: false
VSAN UUID: 5265a8bb-d04d-9344-9dcf-83baa2c0fb23
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 15102757417397371480
Checksum OK: true
Emulated DIX/DIF Enabled: false
t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Device: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Display Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Is SSD: true
VSAN UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 6410776831392425856
Checksum OK: true
Emulated DIX/DIF Enabled: false
查询在使用的磁盘
[root@esxi81:~] vdq -iH
Mappings:
DiskMapping[0]:
SSD: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
MD: t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
MD: t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
[root@esxi81:~] esxcli vsan storage list
t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Device: t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Display Name: t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV
Is SSD: false
VSAN UUID: 525ea6a3-4652-a155-776e-8f4d58b76918
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 4109026058915579745
Checksum OK: true
Emulated DIX/DIF Enabled: false
t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Device: t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Display Name: t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7
Is SSD: false
VSAN UUID: 5265a8bb-d04d-9344-9dcf-83baa2c0fb23
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 15102757417397371480
Checksum OK: true
Emulated DIX/DIF Enabled: false
t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Device: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Display Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Is SSD: true
VSAN UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group UUID: 52713c13-17df-3858-c503-fef6bc2db464
VSAN Disk Group Name: t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__
Used by this host: true
In CMMDS: true
Checksum: 6410776831392425856
Checksum OK: true
Emulated DIX/DIF Enabled: false
查询vsan集群磁盘组
[root@esxi81:~] cmmds-tool find -t HOSTNAME -f json | egrep "uuid|hostname" | sed -e 's/\"content\"://g' | awk '{print $2}' | sed -e 's/[\",\},\,]//g' | xargs -n 2 | while read hostuuid hos
tname; do echo -e "\n\nHost Name: $hostname::: Host UUID: $hostuuid\n Disk Name\t\t| Disk UUID\t\t\t\t| Disk Usage | Disk Capacity | Usage Percentage" ; cmmds-tool find -f python -t DIS
K -o $hostuuid | grep uuid | cut -c 13-48 | while read diskuuid; do cmmds-tool find -f json -t DISK -o $hostuuid -u $diskuuid| egrep "uuid|content" | sed -e 's/\"content\":|\\"uuid\"://g' |
sed -e 's/[\",\},\]//g' | awk '{printf $0}' | sed -e 's/},/\n/g'| awk '{print $37 " " $5 " " $45}'| while read disknaa diskcap maxcomp; do diskcapused=$(cmmds-tool find -f json -t DISK_STA
TUS -u $diskuuid | grep content |sed -e 's/[\",\},\]//g' | awk '{print $3}'); diskperc=$(echo "$diskcapused $diskcap" | awk '{print $1/$2*100}'); if [ "$maxcomp" != 0 ]; then echo -en " $di
sknaa\t| $diskuuid\t| $diskcapused\t | $diskcap\t | $diskperc%\n"; fi;done;done;done
Host Name: exsi82::: Host UUID: 58761127-8db9-be00-5186-90e2ba9325bc
Disk Name | Disk UUID | Disk Usage | Disk Capacity | Usage Percentage
t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA7E25:2 | 5295f488-4d13-1421-71e7-ece36d9cae71 | 1837222592512 | 1980382576640 | 92.7711%
t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FBHD:2 | 523a013b-2f84-ee35-77e3-6a218b33280e | 1834043310080 | 1980382576640 | 92.6106%
t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT616402BU480EGN__:2 | 52747822-732e-32bd-84c9-cf7dcfa95b7d | 0 | 336069656576 | 0%
Host Name: esxi83.localhost.domain::: Host UUID: 55aa2180-1684-9874-33e7-90e2ba932570
Disk Name | Disk UUID | Disk Usage | Disk Capacity | Usage Percentage
t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA71CJ:2 | 52603b80-bfa1-9d1c-f73c-2b973a65709a | 1828519411712 | 1980382576640 | 92.3316%
t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4EEA6:2 | 52aeb43e-29a7-b673-ba65-436235ed6548 | 1836316622848 | 1980382576640 | 92.7253%
t10.ATA_____INTEL_SSDSC2KW480H6_____________________BTLT639104VN480EGN__:2 | 52de900a-7008-61c0-150d-d0b8fee66d5f | 0 | 336069656576 | 0%
Host Name: esxi81::: Host UUID: 58761738-2a5a-46f1-c7e2-e03f49b5ce6a
Disk Name | Disk UUID | Disk Usage | Disk Capacity | Usage Percentage
t10.ATA_____ST2000DM0062D2DM164__________________________________Z4ZA9DT7:2 | 5265a8bb-d04d-9344-9dcf-83baa2c0fb23 | 1758172545024 | 1980382576640 | 88.7794%
t10.ATA_____ST2000DM0062D2DM164__________________________________W4Z4FCNV:2 | 525ea6a3-4652-a155-776e-8f4d58b76918 | 1751419715584 | 1980382576640 | 88.4385%
t10.ATA_____INTEL_SSDSC2KW480H6_____________________CVLT61630BLC480EGN__:2 | 52713c13-17df-3858-c503-fef6bc2db464 | 0 | 336069656576 | 0%
Leave a Reply