VMware vSphere

 View Only
  • 1.  How to caculate the size for a VMFS volume ?

    Posted Feb 17, 2012 02:04 PM

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



  • 2.  RE: How to caculate the size for a VMFS volume ?
    Best Answer

    Posted Feb 17, 2012 02:36 PM

    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)



  • 3.  RE: How to caculate the size for a VMFS volume ?

    Posted Feb 17, 2012 03:15 PM

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