Adding multiple datastore in a single disk

I had a problem within an environment to create multi datastore in a single disk, however it is not supported by VMware but you can do this by partedutil tools which is exsisting in ESXi server.

First we need to get information about identifier for each of esxi hard disks:

ls -ltrh /vmfs/devices/disks/

Then I created the partition on this disk via following command

partedUtil setptbl "/vmfs/devices/disks/naa.6000c29ea036a5753b63bb81825a5d22" gpt "1 2048 52428800 AA31E02A400F11DB9590000C2911D1B8 0"

In the above command we need to define start and end sector, the start is always 2048 but the end should be calculated.

Here I need 25 GB then I convert it to byte, 26,843,545,600

Now because in every sector there is 512 byte we need to divide it to 512: 52,428,800

you can check the result by getptbl command

partedUtil getptbl /vmfs/devices/disks/naa.6000c29ea036a5753b63bb81825a5d22

Now we need to format the partition:

/sbin/vmkfstools -C vmfs6 -b 1m -S Data1 /vmfs/devices/disks/naa.6000c29ea036a5753b63bb81825a5d22:1

Now it is usable in datastore

Leave a Reply

Your email address will not be published. Required fields are marked *

53 − 50 =