Hi
I have not found a single good solution for the problem : "ESXi does not mount an existing datastore"
In my view the mentioned problem comes in several flavours / variants which depends on the level of corruption.
1. the volume is healthy but smells suspicious: use an ESXi that has never seen datastores before (ESXi-LiveCD or newly installed USB-stick) - reading the datastore once with unspoiled ESXi may be enough to fix the "bad smell"
2. the volume is healthy but it is detected as snapshot-LUN: either force mount or resignature
3. the partitiontable is bad: fix the table with partedUtil
4. the volume is healthy but ESXi decides not to display the content: sometimes using a standalone ESXi not connected to a vCenter works after several reboots and setting new signatures or reformatting.
- if not - or if you are in a hurry use vmfs-fuse from linux
5. the volume has healthy data but has slightly damaged VMFS-metadata: use vmfs-fuse - ESXi itself no longer helps
6. the volume has healthy data but severely damaged VMFS-metadata and vmfs-fuse can not read it with "invalid magic number" or "missing magic number" : use UFS-explorer
7. the volume has healthy data but the VMFS-metadata is partly or completely wiped blank: call me - I can extract thick provisioned vmdks in a completely manual way
8. VMFS-metadata AND the actual data is partly corrupted like typical after a failed Raid5 rebuild: call Ontrack if the data is worth it
Whatever you do - watch out: ESXi can become its own worst enemy - it may decide to use a disk that looks empty for scratch space - this can seriously damage a VMFS volume before you even get the chance to repair it
Back to the question: how to mount a VMFS-volume from cli ?
To my best knowledge only case 2 and 3 are documented and the documented procedures work as expected.
Case 1 and 4 are as far as I know not documented in any way but sometimes the problems can be fixed with esxi-commandline tools if you are stubborn and use vooddoo
Fixing slightly corrupted VMFS-metadata is as far as I know not documented at all