My Datastore is gone!!! ESXi 6.5/6.7
Aight! You are those ones, that enters the BIOS every boot of your server, tweaking everything, all the time. And you tweaked your RAID or your SATA, changed from ATA to AHCI, or something like that. Or just moved the HD to another machine. Then you booted your esxi and… none of your VMs appears to boot. Wait… None of my VMS are here! Where is my datastore?
Not a common problem, mostly because no one is like you. Nobody plays with a very good setup of machine’s BIOS or change hardware all the time. That’s why you never found nothing on google. Nobody asks those questions! Neither do I. In my case, because I’m ashamed, since apparently nobody had the same problem.
Also, this blog was made to help myself from things I usually forget how I did, so, there’s nothing more to be ashamed after lose a few hours trying to do something.
First: Let’s see if your data is there. Open vmkernel.log and look for lines more or less like these:
2020-08-02T16:34:10.002Z cpu11:2099343 opID=a8bb7d5e)LVM: 11308: Device t10.ATA_____ST1000DM0032D1ER162__________________________________Z4Y6CNJD:3 detected to be a snapshot:
2020-08-02T16:34:10.002Z cpu11:2099343 opID=a8bb7d5e)LVM: 11315: queried disk ID:
2020-08-02T16:34:10.002Z cpu11:2099343 opID=a8bb7d5e)LVM: 11322: on-disk disk ID:
2020-08-02T16:34:10.016Z cpu11:2099343 opID=a8bb7d5e)VC: 4616: Device rescan time 42 msec (total number of devices 4)
2020-08-02T16:34:10.016Z cpu11:2099343 opID=a8bb7d5e)VC: 4619: Filesystem probe time 11 msec (devices probed 3 of 4)
Take a breathe. Your data is safe. Now, start your SSH shell service on your ESXi, then connect with putty. Get a list of VMFS snapshots using esxcli:
[root@localhost:~] esxcli storage vmfs snapshot list
5f25c577-c3bc2bd0-9063-14187733c919
Volume Name: datastore1
VMFS UUID: 5f25c577-c3bc2bd0-9063-14187733c919
Can mount: true
Reason for un-mountability:
Can resignature: true
Reason for non-resignaturability:
Unresolved Extent Count: 1
Copy the VMFS UUID, and:
[root@localhost:~] esxcli storage vmfs snapshot mount -u 5f25c577-c3bc2bd0-90
14187733c919
The datastore should now up within your storage menu in your web client. Now is just start your servers and spend more time playing.
Be safe.