Creating a new partitiontable after ESXi 4.* wiped it blank was quite easy with fdisk.
Nowadays with partedUtil and ESXi 5 this is not so trivial.
Consider we have a disk/Lun that looks like this
~ # partedUtil get /vmfs/devices/disks/mpx.vmhba1:C0:T4:L0
93990 255 63 1509949440
and lets assume that the original - now messed up Volume was created with ESXi 5.
How do I calculate the value for the end-sector so that I can re-create the VMFS-partition like this:
partedUtil setptbl "/vmfs/devices/disks/mpx.vmhba1:C0:T4:L0" gpt "1 2048 ??? AA31E02A400F11DB9590000C2911D1B8 0"
In this case the correct value was 1509949349 but how can I calculate it if I dont know the correct value ???
Hi,
the out of the command "partedUtil get /vmfs/devices/disks/mpx.vmhba1:C0:T4:L0" will be helpfull, in your case it is "93990 255 63 1509949440"
which gives us values for C/H/S (cylinder/head/sector).
Partition of a VMFS volume must end on a cylinder boundary, so selecting the last sector for the partition table needs to be done using the formula endSector = ( C * H * S - 1).
which is "1509949440 -1" = 1509949349.
Regards
(Ref: http://www.virtuallyghetto.com/2011/07/how-to-format-and-create-vmfs-volume.html)
Hi,
the out of the command "partedUtil get /vmfs/devices/disks/mpx.vmhba1:C0:T4:L0" will be helpfull, in your case it is "93990 255 63 1509949440"
which gives us values for C/H/S (cylinder/head/sector).
Partition of a VMFS volume must end on a cylinder boundary, so selecting the last sector for the partition table needs to be done using the formula endSector = ( C * H * S - 1).
which is "1509949440 -1" = 1509949349.
Regards
(Ref: http://www.virtuallyghetto.com/2011/07/how-to-format-and-create-vmfs-volume.html)
thanks
endSector = ( C * H * S - 1) was the missing piece of info