Informazioni sugli Storages e sui loro Adapters si un server VMWare ESXi
Indice
Rilevazione dischi
Eseguire il comando per generare un elenco di tutti i percorsi LUN attualmente connessi all'host ESXi. / Run the command to generate a list of all LUN paths currently connected to the ESXi host.
esxcli storage core path list
Run the command to generate a list of LUNs currently connected to the ESXi host.
esxcli storage core device list
Run the command to generate a list of extents for each volume and mapping from device name to UUID.
esxcli storage vmfs extent list
Run the command to generate a compact list of the LUNs currently connected to the ESXi host, including VMFS version.
esxcli storage filesystem list
Se un disco è rilevato ma non viene montato
Questo è visibile dal client o dai comandi:
Rilevati:
# esxcli storage core path list // o esxcli storage core path list | grep t10 sata.vmhba32-sata.0:0-t10.ATA_____WDC_WD5003ABYX2D01WERA0_______________________WD2DWMAYP0824164 UID: sata.vmhba32-sata.0:0-t10.ATA_____WDC_WD5003ABYX2D01WERA0_______________________WD2DWMAYP0824164 Device: t10.ATA_____WDC_WD5003ABYX2D01WERA0_______________________WD2DWMAYP0824164 Device Display Name: Local ATA Disk (t10.ATA_____WDC_WD5003ABYX2D01WERA0_______________________WD2DWMAYP0824164) sata.vmhba0-sata.0:0-t10.ATA_____TOSHIBA2DTR150___________________________56KB5095K8ZU________ UID: sata.vmhba0-sata.0:0-t10.ATA_____TOSHIBA2DTR150___________________________56KB5095K8ZU________ Device: t10.ATA_____TOSHIBA2DTR150___________________________56KB5095K8ZU________ Device Display Name: Local ATA Disk (t10.ATA_____TOSHIBA2DTR150___________________________56KB5095K8ZU________) sata.vmhba34-sata.0:0-t10.ATA_____ST1000DM0102D2EP102__________________________________ZN1VJ2PB UID: sata.vmhba34-sata.0:0-t10.ATA_____ST1000DM0102D2EP102__________________________________ZN1VJ2PB Device: t10.ATA_____ST1000DM0102D2EP102__________________________________ZN1VJ2PB Device Display Name: Local ATA Disk (t10.ATA_____ST1000DM0102D2EP102__________________________________ZN1VJ2PB)
Montati:
# esxcli storage vmfs extent list Volume Name VMFS UUID Extent Number Device Name Partition ----------------- ----------------------------------- ------------- -------------------------------------------------------------------------- --------- sistemi_operativi 579612f6-ea43a9a7-862b-00259015f3d6 0 t10.ATA_____TOSHIBA2DTR150___________________________56KB5095K8ZU________ 3 backup_interno 4dac1f7b-2cf1170a-bf99-00259021353f 0 t10.ATA_____WDC_WD5003ABYX2D01WERA0_______________________WD2DWMAYP0824164 2
Possibili scenari:
- La partizione VMFS è corrotta o non viene riconosciuta.
- La tabella delle partizioni è assente o danneggiata.
- Il disco ha un tipo di partizione non VMFS, o nessuna.
- Il volume è stato formattato con una versione VMFS non compatibile (poco probabile tra ESXi 5.x e 6.x).
Per vedere le partizioni presenti:
partedUtil getptbl /vmfs/devices/disks/t10.ATA___...
Esempio di disco con partizione VMFS (es: disco di backup)
# partedUtil getptbl /vmfs/devices/disks/t10.ATA_____WDC... gpt 60801 255 63 976773168 1 2048 976771072 AA31E02A400F11DB9590000C2911D1B8 vmfs 0
Esempio di disco con una partizione diversa
# partedUtil getptbl /vmfs/devices/disks/t10.ATA_____ST1000... gpt 121601 255 63 1953525168 1 2048 1953523711 EBD0A0A2B9E5443387C068B6B72699C7 linuxNative 0
Rescan
To rescan for new or dead volumes, devices or pathes use
esxcli storage core adapter rescan --all
To scan on a specifc adapter determine the HBA name and start a rescan there
esxcli storage core adapter list vmhba2 lpfc link-up fc.60000090be45e120:10000090be45e120 vmhba3 lpfc link-up fc.60000090be45e121:10000090be45e121
esxcli storage core adapter rescan --adapter vmhba2
To scan for new or changed filesystems use
esxcli storage filesystem rescan
In ESXi 7.x
Smontare (UMOUNT) un datastore
esxcli storage filesystem unmount [-u UUID | -l label | -p path ]
To list the permanently detached devices, run this command:
esxcli storage core device detached list
To permanently remove the device configuration information from the system, run this command:
esxcli storage core device set --state=off -d NAA_ID esxcli storage core device set --state=off -d t10.___...
fonte: https://kb.vmware.com/s/article/2004605
Montare i volumi
(ESXi 6.5 e 7.x)
lista dei volumi visti ma non montati
esxcfg-volume -l
Risultato
[root@hypervisor2:~] esxcfg-volume -l Scanning for VMFS-3/VMFS-5 host activity (512 bytes/HB, 2048 HBs). VMFS UUID/label: 63d23a0c-785b4326-c141-00259021346e/backup Can mount: Yes Can resignature: Yes Extent name: t10.ATA_____ST3500413AS_________________________________________Z2A2ZF0V:1 range: 0 - 476671 (MB)
Per montare il volume
esxcfg-volume -m <VMFS UUID|label>
es:
[root@hypervisor2:~] esxcfg-volume -m 63d23a0c-785b4326-c141-00259021346e Mounting volume 63d23a0c-785b4326-c141-00259021346e
per montarlo persistentemente
esxcfg-volume -M <VMFS UUID|label>
per montarlo riassegnando la label
esxcfg-volume -r <VMFS UUID|label>
da provare
esxcli storage filesystem rescan
fonte: https://www.hex64.net/blog/vmware-esxi-can-not-add-existing-iscsi-lun/