VMware Cloud Community
spectVM
Enthusiast
Enthusiast
Jump to solution

Please help recover a VMFS 3 datastore in ESXi 5.1 U1

Hey guys,

I need to some help pretty bad here.

I have multiple datastores most of which are VMFS 5 except for one which is VMFS 3. Today I powered down my box to check something in the bios (no change made), but when the system got back up, the VMFS 3 datastore was unreadable.

I then followed some online tutorial and set try to fix the partition table. However, I set the partition table to GPT when I think the VMFS 3 store was MBR.

My steps:

1. partedUtil getUsableSectors /vmfs/devices/disks/naa.50015179590f8c3f

This gave me a message along the line of no partition or invalid partition. Can't remember.

2. partedUtil setptbl /vmfs/devices/disks/naa.50015179590f8c3f gpt "1 2048 4123456 AA31E02A400F11DB9590000C2911D1B8 0"

Then I did the above as per an online tutorial and forgetting that my datastore was VMFS3 and MBR. Smiley Sad

3. partedUtil getUsableSectors /vmfs/devices/disks/naa.50015179590f8c3f

This gave me a result of 312581774

4. partedUtil setptbl /vmfs/devices/disks/naa.50015179590f8c3f gpt "1 2048 312581774 AA31E02A400F11DB9590000C2911D1B8 0"

Then I did part 4 - again following the tutorial

Clearly these steps were the wrong thing to do for my disk. Can anyone help with fixing all this?

Below is the affected disk. It shows the disk as mounted, but ESXi is not able to find the existing volume and mount the VMs on it.

Also, here is the KB I followed: VMware KB: Recreating a missing VMFS datastore partition in VMware vSphere 5.0/5.1/5.5

Datastore issue.png

More info (following http://virtuallyhyper.com/2012/09/recreating-vmfs-partitions-using-hexdump/:disappointed_face:

~ # hexdump -C -n 512 /vmfs/devices/disks/naa.50015179590f8c3f

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

000001b0  00 00 00 00 00 00 00 00  00 00 00 00 1d 9a 00 00  |................|

000001c0  01 00 ee fe ff ff 01 00  00 00 af 9e a1 12 00 00  |................|

000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|

00000200

~ # hexdump -C -s 65536 -n 512 /vmfs/devices/disks/naa.50015179590f8c3f

00010000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00010200

~ # hexdump -C -s 1114112  -n 512 /vmfs/devices/disks/naa.50015179590f8c3f

00110000  0d d0 01 c0 03 00 00 00  11 00 00 00 01 1a 00 00  |................|

00110010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

00110020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 43 56  |..............CV|

00110030  50 4f 39 34 38 31 30 31  32 36 31 36 30 41 47 4e  |PO94810126160AGN|

00110040  20 20 49 4e 54 45 4c 20  00 00 00 00 00 00 00 00  |  INTEL ........|

00110050  00 00 00 00 00 00 00 00  00 00 00 02 00 00 00 82  |................|

00110060  14 43 25 00 00 00 01 00  00 00 54 02 00 00 53 02  |.C%.......T...S.|

00110070  00 00 03 00 00 00 00 00  00 00 00 00 10 01 00 00  |................|

00110080  00 00 28 ff 64 4b fe 02  43 47 97 22 00 e0 ed 0d  |..(.dK..CG."....|

00110090  0b 0e 1c 98 65 d6 6d 7e  04 00 83 02 3e b0 4b f0  |....e.m~....>.K.|

001100a0  04 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

001100b0  00 00 00 00 00 00 00 00  00 00 c5 ae 95 01 00 00  |................|

001100c0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

*

00110200

~ # fdisk -lu /vmfs/devices/disks/naa.50015179590f8c3f

***

*** The fdisk command is deprecated: fdisk does not handle GPT partitions.  Please use partedUtil

***

Found valid GPT with protective MBR; using GPT

Disk /vmfs/devices/disks/naa.50015179590f8c3f: 312581808 sectors,  298M

Logical sector size: 512

Disk identifier (GUID): 19700107-395f-4915-a262-03dda5266ea5

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 312581774

Number  Start (sector)    End (sector)  Size       Code  Name

   1            2048       312581774        298M   0700

~ #

Reply
0 Kudos
1 Solution

Accepted Solutions
spectVM
Enthusiast
Enthusiast
Jump to solution

Well, I ended up using vmfs-fuse to recover the data: VMFS: Unsupported version 5 - How to mount VMFS5 on Ubuntu |My Technical Blog

It truly sucks that ESXi itself could not read the disk.

View solution in original post

Reply
0 Kudos
3 Replies
spectVM
Enthusiast
Enthusiast
Jump to solution

Well, I ended up using vmfs-fuse to recover the data: VMFS: Unsupported version 5 - How to mount VMFS5 on Ubuntu |My Technical Blog

It truly sucks that ESXi itself could not read the disk.

Reply
0 Kudos
Ethan44
Enthusiast
Enthusiast
Jump to solution

Hi

Welcome to the communities.

Please run below two command and sahre the output

This command shows the partitions and volumes within the .vmdk file.

vmware-mount /p

Determine which partition to mount. In the following example, this partition appears as N. vmware-mount /v:N R: diskfile.vmdk

Take care!

Reply
0 Kudos
spectVM
Enthusiast
Enthusiast
Jump to solution

Posted in the wrong thread?

I don't see how your reply relates to my posted issue.

Reply
0 Kudos