Skip to main content

Recreating a VMFS-3 or VMFS-5 partition table in ESXi 5.x

For this kind of issues you need to engage VMware support on this, following any part of this article could lead to more complex situation if not ran by an expert.


 Symptoms
Datastore does not mount because of a lost or overwritten partition table.
 Purpose
When a VMFS partition is created in ESX 3.x or ESX 4.x, it has a Master Boot Record (MBR) partition map. The MBR is written to the first 512 B block (LBA0) and contains the information where the (VMFS) partition starts and ends.

ESXi 5.0 introduced VMFS-5, which uses a GUID partition table (GPT) for new datastores.

When a VMFS-3 partition is created in ESXi 5.x and is later updated to VMFS-5, the original partition map (MBR) is maintained.

If the partition information of a VMFS datastore is deleted or overwritten (for example, by a Windows system with direct access to the same disks), it is impossible to determine if the partition map was GPT or MBR. The only time you can be sure that a GPT partition map was used is if the disk is over 2 TB in size.

This article provides information on recreating a VMFS-5 partition, regardless of whether a GUID or an MBR partition map was on the disk before.
 Resolution

Note: For a friendly version of this process, see Re-creating a missing VMFS datastore partition in vSphere 5.

Offsets with VMFS-3 and VMFS-5 partitions

This combination of offsets and VMFS versions is possible:
  • VMFS-3 partition with an offset of 128 blocks (created on ESX 3.x or ESX 4.x)
  • VMFS-3 partition with an offset of 2048 blocks (created on ESXi 5.0)
  • VMFS-5 partition with an offset of 128 blocks (created on ESX 3.x or ESX 4.x and later upgraded to VMFS-5 in ESXi 5.0)
  • VMFS-5 partition with an offset of 2048 blocks (created on ESXi 5.0, possibly upgraded from VMFS-3)
The hexdump command can be used to determine the correct starting block, which is described later.

Comparison of output from fdisk and partedUtil

Here is an example of two healthy VMFS datastores:

Note: In this example, both datastores have been created on ESXi 5.0, one VMFS-3 and one VMFS-5. As such, the VMFS partitions have a starting offset of 2048 blocks or 1 MB (instead of typically 128 blocks or 64 K for a VMFS-3 partition when created on an ESX prior to vSphere 5.0).

# fdisk -lu
Disk /dev/disks/naa.6006048c7bc7febbf4db26ae0c3263cb: 9437 MB, 9437184000 bytes
255 heads, 63 sectors/track, 1147 cylinders, total 18432000 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/disks/naa.6006048c7bc7febbf4db26ae0c3263cbp1 2048 18426554 9212253+ fb VMFS

Disk /dev/disks/naa.6006048c13e056de156e0f6d8d98cee2: 9437 MB, 9437184000 bytes
255 heads, 63 sectors/track, 1147 cylinders, total 18432000 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2p1 1 18431999 9215999+ ee EFI GPT

The first disk has a VMFS-3 datastore and has been created on ESXi 5.0, therefore it has a starting block of 2048 for the VMFS partition. The filesystem was then upgraded to VMFS-5. The partition map remains MBR as we can see the partition type is fb.

The second disk has a VMFS-5 datastore and has been created on ESXi 5.0 as well, but fdisk only shows the EFI GPT partition (type ee) in the protective MBR, starting at block 1. It cannot see the VMFS partition in the GUID partition map.

This is the same partition output from partedUtil, which replaces fdisk in ESXi 5.0:

# partedUtil getptbl /vmfs/devices/disks/naa.6006048c7bc7febbf4db26ae0c3263cb
msdos
1147 255 63 18432000
1 2048 18426554 251 0

# partedUtil getptbl /vmfs/devices/disks/naa.6006048c13e056de156e0f6d8d98cee2
gpt
1147 255 63 18432000
1 2048 18426554 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

Note: For more information on using partedUtil and about GUID partition tables, see Using the partedUtil command line utility on ESX and ESXi (1036609).

Determine which partition type was used when partition table is missing

The next step overwrites all partition information with zeros.

CautionThis is only for simulating the accidental loss of all partition information. Do not perform this in a production environment.

# dd if=/dev/zero bs=10k count=10 of=/dev/disks/naa.6006048c7bc7febbf4db26ae0c3263cb conv=notrunc
10+0 records in
10+0 records out

# dd if=/dev/zero bs=10k count=10 of=/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2 conv=notrunc
10+0 records in
10+0 records out

There is no way of finding out if there was a MBR or a GPT on this datastore. What would happen if we use a partition map, which is not the one that was used originally? Will the datastores still mount?

Look at the beginning of the device with hexdump, which now shows zeros for the first two MB:

Disk one:

# hexdump -C /vmfs/dev/disks/naa.6006048c7bc7febbf4db26ae0c3263cb | less
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
* <----- the asterisk means that all lines until the next have the same content as the last line above
00200000 0d d0 01 c0 05 00 00 00 15 00 00 00 02 16 00 00 |................|<- Beginning of the device
00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| section, LVM Magic
00200020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 06 |..............`.|
00200030 04 8c 7b c7 fe bb f4 db 26 ae 0c 32 63 cb 43 65 |..{.....&..2c.Ce| <- naa ID
00200040 6c 65 72 72 00 00 00 00 00 00 00 00 00 00 00 00 |lerr............|
00200050 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 76 |...............v|
00200060 45 32 02 00 00 00 01 00 00 00 23 00 00 00 22 00 |E2........#...".|
00200070 00 00 05 00 00 00 00 00 00 00 00 00 10 01 00 00 |................|
00200080 00 00 c9 1e 44 4e 00 f0 1c 6f 9b 92 00 50 56 39 |....DN...o...PV9|
00200090 03 b8 51 cc cb ee 3e aa 04 00 7c 1e 18 f1 3e aa |..Q...>...|...>.|
002000a0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00200200 00 00 00 30 02 00 00 00 24 00 00 00 00 00 00 00 |...0....$.......|
00200210 01 00 00 00 34 65 34 34 31 65 63 36 2d 63 31 30 |....4e441ec6-c10| <- LVM UUID
00200220 66 63 33 30 33 2d 37 39 66 38 2d 30 30 35 30 35 |fc303-79f8-00505|
00200230 36 33 39 30 33 62 38 00 00 00 00 00 00 00 00 00 |63903b8.........|
00200240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00200250 00 00 00 00 c6 1e 44 4e 03 c3 0f c1 f8 79 00 50 |......DN.....y.P|
00200260 56 39 03 b8 01 00 00 00 20 c2 cd ee 3e aa 04 00 |V9...... ...>...|
00200270 00 00 00 00 23 00 00 00 00 00 00 00 00 00 00 00 |....#...........|
00200280 22 00 00 00 00 00 00 00 1f 63 d4 ee 3e aa 04 00 |"........c..>...|
00200290 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0027e200 6e 61 61 2e 36 30 30 36 30 34 38 63 37 62 63 37 |naa.6006048c7bc7| <- naa ID(s) of extent(s)
0027e210 66 65 62 62 66 34 64 62 32 36 61 65 30 63 33 32 |febbf4db26ae0c32|
0027e220 36 33 63 62 3a 31 00 00 00 00 00 00 00 00 00 00 |63cb:1..........|
0027e230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

The device section starts here at 0x200000 (or 2 MB), which is explained by 2048 blocks or 1 MB for the partition offset and another 1 MB of padding within every VMFS partition (versions 3 and 5).

If the VMFS-3 datastore had been created on a version prior to ESXi 5.0, the offset for the device section of the partition would be at 1 MB and 64 KB and it would look like:

~ # hexdump -C /vmfs/devices/disks/naa.6006048c1bc6eb09a6e0a6e967f79cd2 -n 3000000| grep "0d d0 01 c0 05"
00110000 0d d0 01 c0 05 00 00 00 15 00 00 00 02 16 0a 00 |................|

The command above searches for the LVM magic number within the first two to three MB.

Examples of hex vs decimal offsets:

10(h) = 16
100(h) = 256
10000(h) = 64k [or 128 blocks (of 512 B), typical alignment of a VMFS-3 partition on ESX 3.x and 4.x]
100000(h) = 1 MB
(200000(h) = 2 MB, etc.)

Disk two:

hexdump -C /vmfs/devices/disks/naa.6006048c13e056de156e0f6d8d98cee2 | less

00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00200000 0d d0 01 c0 05 00 00 00 15 00 00 00 02 16 01 00 |................|
00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00200020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 06 |..............`.|
00200030 04 8c 13 e0 56 de 15 6e 0f 6d 8d 98 ce e2 43 65 |....V..n.m....Ce|
00200040 6c 65 72 72 00 00 00 00 00 00 00 00 00 00 00 00 |lerr............|
00200050 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 76 |...............v|
00200060 45 32 02 00 00 00 01 00 00 00 23 00 00 00 22 00 |E2........#...".|
00200070 00 00 03 00 00 00 00 00 00 00 00 00 10 01 00 00 |................|
00200080 00 00 1a 1f 44 4e e8 42 ec 8c 4e a1 00 50 56 39 |....DN.B..N..PV9|
00200090 03 b8 4c e2 9e f3 3e aa 04 00 c6 ac cb f8 3e aa |..L...>.......>.|
002000a0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00200200 00 00 00 30 02 00 00 00 24 00 00 00 00 00 00 00 |...0....$.......|
00200210 01 00 00 00 34 65 34 34 31 66 31 37 2d 64 63 61 |....4e441f17-dca|
00200220 37 33 63 36 33 2d 39 64 39 38 2d 30 30 35 30 35 |73c63-9d98-00505|
00200230 36 33 39 30 33 62 38 00 00 00 00 00 00 00 00 00 |63903b8.........|
00200240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00200250 00 00 00 00 17 1f 44 4e 63 3c a7 dc 98 9d 00 50 |......DNc<.....P|
00200260 56 39 03 b8 01 00 00 00 a2 0a a1 f3 3e aa 04 00 |V9..........>...|
00200270 00 00 00 00 23 00 00 00 00 00 00 00 00 00 00 00 |....#...........|
00200280 22 00 00 00 00 00 00 00 e2 06 a8 f3 3e aa 04 00 |"...........>...|
00200290 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002002a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
0027e200 6e 61 61 2e 36 30 30 36 30 34 38 63 31 33 65 30 |naa.6006048c13e0|
0027e210 35 36 64 65 31 35 36 65 30 66 36 64 38 64 39 38 |56de156e0f6d8d98|
0027e220 63 65 65 32 3a 31 00 00 00 00 00 00 00 00 00 00 |cee2:1..........|
0027e230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
This information is more or less just the LV UUID and the disk's naa ID(s), which are different.

Recreate the partition tables on the LUNs

Now create a GPT partition on the first disk (which used to be MBR) and create an MBR partition on the second disk (which used to be GPT):

# partedUtil setptbl /vmfs/devices/disks/naa.6006048c7bc7febbf4db26ae0c3263cb gpt "1 2048 18426554 AA31E02A400F11DB9590000C2911D1B8 0"
gpt
0 0 0 0
1 2048 18426554 AA31E02A400F11DB9590000C2911D1B8 0
# partedUtil setptbl /vmfs/devices/disks/naa.6006048c13e056de156e0f6d8d98cee2 msdos "1 2048 18426554 251 0"
msdos
0 0 0 0
1 2048 18426554 251 0

Explanation:
  • 1 = Partition number
  • 2048 = Starting block, which we know from the hexdump output (0x200000 = 2 MB = 2048 Blocks of 512 B)
  • 18426554 = End block, which is calculated as follows: ["C" x "H" x "S" -1]. In this example:

    "255 heads" x "63 sectors/track" x "1147 cylinders" -1 = 18426554)

    Notefdisk and partedUtil both show the C/H/S values.

  • AA31E02A400F11DB9590000C2911D1B8 = GUID of every VMFS partition in a GPT partition entry
  • 251 = partition type "fb" in decimal, which is the partition type of a VMFS-3 partition.
This is the new partition layout of both disks:
  • Disk One:

    # partedUtil getptbl /vmfs/devices/disks/naa.6006048c7bc7febbf4db26ae0c3263cb
    gpt
    1147 255 63 18432000
    1 2048 18426554 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

  • Disk Two:

    # partedUtil getptbl /vmfs/devices/disks/naa.6006048c13e056de156e0f6d8d98cee2
    msdos
    1147 255 63 18432000
    1 2048 18426554 251 0


Will the partitions still mount? This is from an ESX host that has been rebooted after the above steps were performed:

# esxcli storage filesystem list
Mount Point Volume Name UUID Mounted Type Size Free
------------------------------------------------- ------------------------------ ----------------------------------- ------- ------ ----------- ----------
/vmfs/volumes/4e441f1b-17c6cea9-2305-0050563903b8 vmfs5_gpt 4e441f1b-17c6cea9-2305-0050563903b8 true VMFS-5 9395240960 8476688384
/vmfs/volumes/4e441eca-ecb65b87-0088-0050563903b8 vmfs3_later_upgraded2vmfs5_mbr 4e441eca-ecb65b87-0088-0050563903b8 true VMFS-5 9395240960 8803844096

# esxcfg-scsidevs -m
naa.6006048c7bc7febbf4db26ae0c3263cb:1 /vmfs/devices/disks/naa.6006048c7bc7febbf4db26ae0c3263cb:1 4e441eca-ecb65b87-0088-0050563903b8 0 vmfs3_later_upgraded2vmfs5_mbr
naa.6006048c13e056de156e0f6d8d98cee2:1 /vmfs/devices/disks/naa.6006048c13e056de156e0f6d8d98cee2:1 4e441f1b-17c6cea9-2305-0050563903b8 0 vmfs5_gpt

If the disk is smaller than 2 TB, it does not matter if the partition type of a VMFS-5 datastore was MBR or GPT. MBR and GPT are just different ways to point to the VMFS partition. What does matter is the correct offset (beginning) of the VMFS partition.


 Related Information
The information in this section is for demonstration purposes only. In this section, the label (gpt or msdos(mbr)) of the second disk is changed back to GPT:

# partedUtil
Not enough arguments

Usage:
...
Fix Partition Table : fix <diskName>
Create New Label (all existing data will be lost): mklabel <diskName> <label></label>
...

NotepartedUtil warns you that all data will be lost. What actually gets lost is "all partitioning" information, but this can be re-created. Nevertheless, before making any modifications to a disk, VMware strongly recommends that you to make a backup of the beginning of the disk with dd and store it in a safe place. For more information, see Collecting and applying raw metadata dumps on VMFS volumes using dd (1020645).

Put a GPT partition type on the second disk:

# partedUtil mklabel /vmfs/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2 gpt

Checking current partition layout with partedUtil and fdisk:

# partedUtil getptbl /vmfs/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2
gpt
1147 255 63 18432000

# fdisk -l /vmfs/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2

Disk /dev/disks/naa.6006048c13e056de156e0f6d8d98cee2: 9437 MB, 9437184000 bytes
255 heads, 63 sectors/track, 1147 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2p1 1 1148 9215999+ ee EFI GPT

It is now GPT again, with a new protective MBR (ee type partition) and the primary GPT header. No partitions exist yet. However, you did not lose any data, as hexdump shows:

00000000 fa b8 00 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0 |................|
00000010 fb be 00 7c bf 00 06 b9 00 02 f3 a4 ea 21 06 00 |...|.........!..|
00000020 00 be be 07 38 04 75 0b 83 c6 10 81 fe fe 07 75 |....8.u........u|
00000030 f3 eb 16 b4 02 b0 01 bb 00 7c b2 80 8a 74 01 8b |.........|...t..|
00000040 4c 02 cd 13 ea 00 7c 00 00 eb fe 00 00 00 00 00 |L.....|.........|
00000050 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 6c cb 02 00 1d 9a 00 00 |........l.......|
000001c0 01 00 ee fe ff ff 01 00 00 00 ff 3f 19 01 00 00 |...........?....|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
* new protective MBR
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| (LBA0, 0x0 – 0x1ff)
--------------------------------------------------------------------------------------------------
00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
00000210 c6 38 3f c7 00 00 00 00 01 00 00 00 00 00 00 00 |.8?.............|
00000220 ff 3f 19 01 00 00 00 00 22 00 00 00 00 00 00 00 |.?......".......|
00000230 de 3f 19 01 00 00 00 00 6d cf 5c a0 f5 45 5c 40 |.?......m.\..E\@|
00000240 b0 2f 49 35 ff ae f6 6e 02 00 00 00 00 00 00 00 |./I5...n........|
00000250 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| new Primary GPT header
* (LBA1, 0x200 – 0x3ff)
---------------------------------------------------------------------------------------------------
no partition info
(LBA2 or 0x400 - 0x599)
---------------------------------------------------------------------------------------------------
00200000 0d d0 01 c0 05 00 00 00 15 00 00 00 02 16 01 00 |................|
00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00200020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 06 |..............`.|
00200030 04 8c 13 e0 56 de 15 6e 0f 6d 8d 98 ce e2 43 65 |....V..n.m....Ce|
00200040 6c 65 72 72 00 00 00 00 00 00 00 00 00 00 00 00 |lerr............|
00200050 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 76 |...............v|
00200060 45 32 02 00 00 00 01 00 00 00 23 00 00 00 22 00 |E2........#...".|
00200070 00 00 03 00 00 00 00 00 00 00 00 00 10 01 00 00 |................|
00200080 00 00 1a 1f 44 4e e8 42 ec 8c 4e a1 00 50 56 39 |....DN.B..N..PV9|
00200090 03 b8 4c e2 9e f3 3e aa 04 00 10 77 c4 63 3f aa |..L...>....w.c?.|
002000a0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00200200 00 00 00 30 02 00 00 00 24 00 00 00 00 00 00 00 |...0....$.......|
00200210 01 00 00 00 34 65 34 34 31 66 31 37 2d 64 63 61 |....4e441f17-dca|
00200220 37 33 63 36 33 2d 39 64 39 38 2d 30 30 35 30 35 |73c63-9d98-00505|
00200230 36 33 39 30 33 62 38 00 00 00 00 00 00 00 00 00 |63903b8.........|
00200240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|

This command, which was used above, re-creates the partition entry for the datastore:

# partedUtil setptbl /vmfs/dev/disks/naa.6006048c13e056de156e0f6d8d98cee2 gpt "1 2048 18426554 AA31E02A400F11DB9590000C2911D1B8 0"

hexdump output:

================
00000000 fa b8 00 10 8e d0 bc 00 b0 b8 00 00 8e d8 8e c0 |................|
00000010 fb be 00 7c bf 00 06 b9 00 02 f3 a4 ea 21 06 00 |...|.........!..|
00000020 00 be be 07 38 04 75 0b 83 c6 10 81 fe fe 07 75 |....8.u........u|
00000030 f3 eb 16 b4 02 b0 01 bb 00 7c b2 80 8a 74 01 8b |.........|...t..|
00000040 4c 02 cd 13 ea 00 7c 00 00 eb fe 00 00 00 00 00 |L.....|.........|
00000050 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 39 a7 05 00 1d 9a 00 00 |........9.......|
000001c0 01 00 ee fe ff ff 01 00 00 00 ff 3f 19 01 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.| LBA0
---------------------------------------------------------------------------------------------
00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
00000210 e4 12 78 7a 00 00 00 00 01 00 00 00 00 00 00 00 |..xz............|
00000220 ff 3f 19 01 00 00 00 00 22 00 00 00 00 00 00 00 |.?......".......|
00000230 de 3f 19 01 00 00 00 00 50 7e a9 41 b3 12 93 4e |.?......P~.A...N|
00000240 b0 3b 71 3c 27 be 0a c3 02 00 00 00 00 00 00 00 |.;q<'...........|
00000250 80 00 00 00 80 00 00 00 10 8b f3 23 00 00 00 00 |...........#....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
* LBA1
---------------------------------------------------------------------------------------------
00000400 2a e0 31 aa 0f 40 db 11 95 90 00 0c 29 11 d1 b8 mailto:%7C*.1..@......)...%7C
00000410 1b 04 36 83 6d ef c2 4f ad 26 c6 2f 80 d4 89 3a |..6.m..O.&./...:|
00000420 00 08 00 00 00 00 00 00 ba 2a 19 01 00 00 00 00 |.........*......| LBA2, which now shows the
00000430 00 00 00 00 00 00 00 00 00 00 ff ff ff ff ff ff |................| VMFS partiton entry (see
00000440 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| the first4 bytes of the:
* VMFS UUID aa 31 e0 2a
00000480 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| in little endian)
*
-------------------------------------------------------------------------------------------
00200000 0d d0 01 c0 05 00 00 00 15 00 00 00 02 16 01 00 |................|
00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00200020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 60 06 |..............`.|
00200030 04 8c 13 e0 56 de 15 6e 0f 6d 8d 98 ce e2 43 65 |....V..n.m....Ce|
00200040 6c 65 72 72 00 00 00 00 00 00 00 00 00 00 00 00 |lerr............|
00200050 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 76 |...............v|
00200060 45 32 02 00 00 00 01 00 00 00 23 00 00 00 22 00 |E2........#...".|
00200070 00 00 03 00 00 00 00 00 00 00 00 00 10 01 00 00 |................|
00200080 00 00 1a 1f 44 4e e8 42 ec 8c 4e a1 00 50 56 39 |....DN.B..N..PV9|
00200090 03 b8 4c e2 9e f3 3e aa 04 00 d6 b2 07 26 43 aa |..L...>......&C.|
002000a0 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
002000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 |................|
002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00200200 00 00 00 30 02 00 00 00 24 00 00 00 00 00 00 00 |...0....$.......|
00200210 01 00 00 00 34 65 34 34 31 66 31 37 2d 64 63 61 |....4e441f17-dca|
00200220 37 33 63 36 33 2d 39 64 39 38 2d 30 30 35 30 35 |73c63-9d98-00505|
00200230 36 33 39 30 33 62 38 00 00 00 00 00 00 00 00 00 |63903b8.........|
...

For related information, see:
Recovering a lost partition table on a VMFS volume
\
Collecting and applying raw metadata dumps on VMFS volumes using DD (Data Description)
Using the partedUtil command line utility on ESXi and ESX
Recreating a missing VMFS datastore partition in VMware vSphere 5.x and 6.x
 Confidential or Internal Information
Jeff Taylor (jetaylor) has created a script that identifies starting offset, ending offset, volume size and LVM version for a device and provides you with the partedUtil command to run to recreate partition table of a device.

NOTE
:
  • This tool should only be run on ESXi.
  • If you run this on customer host, please ensure accuracy of the outputs and always dd the 1.2 gb of the device prior to running this as a precautionary step.
Here are the steps -
  1. Download the attached find_vmfs_partition_boundaries.sh script and upload to ESXi host's /tmp directory
  2. Change permission:

    "chmod 777 /tmp/find_vmfs_partition_boundaries.sh"


  3. Change directory to:

    /sbin - "cd /sbin"


  4. Run the script against the device (naa.60060160729025007628b54969f4e211 in this example, do not use the path /vmfs/devices/disks):

    ../tmp/find_vmfs_partition_boundaries.sh naa.60060160729025007628b54969f4e211
    Using naa.60060160729025007628b54969f4e211 ...
    Starting offset is 1048576 and LVM majorVersion is 05. Assuming VMFS5 and GPT.
    Done. Check the /tmp/partitioncmds.txt file for partition-creation syntax.


  5. "less /tmp/partitioncmds.txt" provides the command to run:


    partedUtil setptbl /vmfs/devices/disks/naa.60060160729025007628b54969f4e211 gpt "1 2048 1048562549 AA31E02A400F11DB9590000C2911D1B8 0"

Comments

Popular posts from this blog

Question كيفية عمل share للـ outlook conntact لكل الـ Domain Users

  الحل بسيط جدا عايز الكونتاكت تتحدث دايما بحيث انك لما تضيف يوزر جديد يسمع في الكونتاكت اول حاجه بتدخل علي in office 2003 tools --- email account ---- add address book --- internet directory service (LDAP) type your server name then login info . mark this server require me to logon type any user on active directory and its password then save and close outlook and open it again now you will find all your active directory users in address book

ما هى ال FSMO Roles

  بأختصار ال FSMO Roles هى اختصار ل Flexible Single Operation Master و هى عباره عن 5 Roles فى ال Active Directory و هما بينقسموا لقسمين A - Forest Roles 1- Schema Master Role و هى ال Role اللى بتتحكم فى ال schema و بيكون فى Schema Master Role واحد فى ال Forest بيكون موجود على Domain Controller و بيتم التحكم فيها من خلال ال Active Directory Schema Snap in in MMC بس بعد ما يتعمل Schema Register بواسطه الامر التالى من ال Cmd regsvr32 schmmgmt.dll 2-Domin Naming Master و هى ال Role المسئوله عن تسميه ال Domains و بتتأكد ان مفيش 2 Domain ليهم نفس الاسم فى ال Forest و بيتم التحكم فيها من خلال ال Active Directory Domains & Trusts B- Domain Roles 1-PDC Emulator و هى ال Role اللى بتتحكم فى ال Password change فى ال domain و بتتحكم فى ال time synchronization و هى تعتبر المكان الافتراضى لل GPO's و هى تعتبر Domain Role مش زى الاتنين الاولانيين و بيتم التحكم فيها من خلال ال Active directory Users & Computers عن طريق عمل كليك يمين على اسم الدومين و نختار operations master فى تاب ال PDC Emu

3 things has to be done for better performance

  Tips from Goutham: 3 things has to be done for better performance: By default, XP displays extra graphic objects for menu items which can slow down your display. 1. To turn off these selectively... Right click My Computer Select Properties Click Advanced tab Under Performance, click Settings button To turn them all off, select Adjust for best performance Preference is to leave them all off except for Show shadows under mouse pointer and Show window contents while dragging 2. To speed up the display of the Start Menu Items, turn off the menu shadow. Right click open area of the Desktop Select Properties Click Appearance tab Click Effects button Uncheck Show shadows under menus 3. You can increase system performance by loading more of the system into memory. DO NOT attempt this with less then 512MBs of ram. Your system will become unstable. Click Start Click Run Enter regedit Click OK Go to HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Control Session Manager Memory Management Double cli