VMware Cloud Community
continuum
Immortal
Immortal
Jump to solution

How to caculate the size for a VMFS volume ?

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 ???


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
1 Solution

Accepted Solutions
Shakaal
Hot Shot
Hot Shot
Jump to solution

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)

View solution in original post

0 Kudos
2 Replies
Shakaal
Hot Shot
Hot Shot
Jump to solution

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)

0 Kudos
continuum
Immortal
Immortal
Jump to solution

thanks
endSector = ( C * H * S - 1) was the missing piece of info


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos