VMware Cloud Community
DavidHabermehl
Contributor
Contributor

ESXi datastore sizing question

I installed ESXi 6.7 on a system whose only storage is a 2TB SSD. I see that the datastore occupies all available space left over after the installation. I want the space occupied by the datastore to be much smaller and I want the leftover space simply to be unallocated instead of being dedicated to ESXi. How can I accomplish that? Here's the current partition information:

pastedImage_0.png

Thanks,

David Habermehl

Reply
0 Kudos
11 Replies
jburen
Expert
Expert

One way of "solving" this is to install ESXi on a separate disk i.e. 120G SSD. Or partition the disk before you install ESXi.

Consider giving Kudos if you think my response helped you in any way.
Biemer
Enthusiast
Enthusiast

If there is no VM on that datastore, then the easiest way is to delete it and then create a new smaller datastore.

Consider marking this response as "Correct" or "Helpful" if you think my response helped you in any way.
Reply
0 Kudos
scott28tt
VMware Employee
VMware Employee

The VMFS is for VM storage. What else will you use that space for?


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
Reply
0 Kudos
DavidHabermehl
Contributor
Contributor

I want to end up with a new 1TB partition that is completely independent of ESXi. I will use that partition from various of my virtual machines.

Reply
0 Kudos
DavidHabermehl
Contributor
Contributor

> Or partition the disk before you install ESXi

That sounds promising. So I would create, say,

  1. two partitions: say a 1TB partition where ESXi and its datastore will  live, and a 1 TB partition that will be completely independent of ESXi. Or perhaps ...
  2. a 1 TB partition that will be completely independent of ESXi and leave the rest of the disk unallocated.

Then, I assume that the ESXi install will ask me where it should install ESXi (including its datastore). Right?

Thanks,

David

Reply
0 Kudos
DavidHabermehl
Contributor
Contributor

I tried that. At the end of the interaction when I clicked finish, I got an error: "Failed to create VMFS datastore Cannot change the host configuration."

Reply
0 Kudos
a_p_
Leadership
Leadership

That's the expected behavior, the UI only supports creating VMFS partitions (datastores) if no other partitions are present on the LUN.

A way how to archive your goal could be to

  1. read the original partition table using parteUtil getptbl ... command
  2. delete the VMFS datastore from the UI (it's usually partition 3)
  3. recreate the partition table using partedUtil setptbl ... with the desired size for partition 3
  4. manually format the new partition as a VMFS datsatore using the vmkfstools -C ... command

Please note that the partedUtil setptbl command requires that you specify all partitions in the correct (original) order, because it will completely overwrite the partition table.

I will use that partition from various of my virtual machines.

Out of curiosity, how exactly do you plan to do this?

André

DavidHabermehl
Contributor
Contributor

> Out of curiosity, how exactly do you plan to do this?

A few years ago at my place of employment, I used VMware Workstation. The VMs that I created there had the ability to access "external" drive letters. Does a VM hosted in ESXi have an analogous capability?

> A way how to archive your goal could be to ...

I might have gotten close to that yesterday evening. I resized partition 3 via

partedUtil resize "/vmfs/devices/disks/t10.NVMe____Samsung_SSD_970_EVO_Plus_2TB____________5952509157382500" 3 15472640 1089214463

That produced a partition 3 of the desired size, but then ESXi displayed no datastore.

Reply
0 Kudos
continuum
Immortal
Immortal

You did not format the datastore after the resize ..


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

Reply
0 Kudos
a_p_
Leadership
Leadership

The VMs that I created there had the ability to access "external" drive letters. Does a VM hosted in ESXi have an analogous capability?

No, there's nothing like shared folders in ESXi. If you want to share files, the best option is to create a VM, share a folder, and use the default network mapping to access this resource.

That produced a partition 3 of the desired size, but then ESXi displayed no datastore.

Resizing will work too, but you missed the last step, i.e. formatting the volume again.

One more hint: After resizing, and formatting run vmkfstools -V (please note the upper case -V), which rescans the volumes.

André

DavidHabermehlA
Contributor
Contributor

Thanks! Victory. This sequence ..

partedUtil resize "/vmfs/devices/disks/t10.NVMe____Samsung_SSD_970_EVO_Plus_2TB____________5952509157382500" 3 15472640 1089214463

vmkfstools -C vmfs6 "/vmfs/devices/disks/t10.NVMe____Samsung_SSD_970_EVO_Plus_2TB____________5952509157382500:3"

.. produced exactly what I sought:

pastedImage_1.png

But since ESXi doesn't support shared folders it became an academic exercise. I'll end up using the default configuration with a max-sized datastore. Thanks again for your patient help.

Reply
0 Kudos