How to mount an iSCSI datastore in ESXI CLI
I have an annoying issue that I can’t get to the bottom of – whenever we have a powercut that lasts longer than my UPS’s can deal with, i lose my main ESXi server. When that happens I occasionaly lose all of my iSCSCI connected drives. Rebooting the ESXi server, switches or the NAS does not bring them back. I don’t know the cause, but here is a manual fix:
Logon to ESXi using SSH (or the use the local console), then type the following:
esxcfg-volume -l
This will list all of the available but unmounted volumes, here is an example of the output, the important bit is the datastore name which is highlighted in red:
[root@esx:~] esxcfg-volume -l
Scanning for VMFS-6 host activity (4096 bytes/HB, 1024 HBs).
VMFS UUID/label: 602abcc0-712350e3-fd12-00aabbccdd11/LUN--test-lun
Can mount: Yes
Can resignature: Yes
Extent name: naa.6001235e70cf9c1d9123d49b3da9a35cd:1 range: 0 - 4863 (MB)
To mount the volume you type:
esxcfg-volume -m <datastorename>
The iSCSI datastores should now be available in the web console.
on 11 July 2024 at 11:24
· Permalink
Thanks for this.