VMware Cloud Community
vmwaren00bie
Contributor
Contributor

VMDK file size on NFS

I have a ESXi 4.1 Update 1 host and wanted to try out Thin Provisioning. On that host, I am creating a VM with 20 GB virtual disk.

The virtual disk is created on a NFS datastore (NetApp FAS 2020). Since its NFS, Thin Provisioning is the only option.

However this is what I notice.

When I browse datastore via the vSphere Client it shows the provisioned size of the VMDK file at about 20 GB and the size at about 2.5 GB.

datastore.JPG

But when I login into the NFS server itself, it shows the physcal size of the VMDK file on the disk at about 20 GB.

nfs.JPG

I was under the impression that if using thin provisioning, the size of the file when seen on the NFS server directly should also be at about 2.5 GB and its supposed to grow as the VM uses up more of its virtual disk space.

Isnt that what its supposed to be ? Or am I misunderstanding thin provisioning ? Or isit that I am not reading/interpreting these numbers correctly ?

0 Kudos
7 Replies
vmroyale
Immortal
Immortal

Hello.

What command did you issue on the NetApp to obtain that listing?  Was it the "ls" command?  Does the "du" command report differently?

Good Luck!

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
vmwaren00bie
Contributor
Contributor

Neither 'ls' nor 'du' are showing up as available commands on the NetApp.

What I did was I mounted the exported volume on another Linux server and that output is from the 'ls' command from that Linux server.

When I do a 'du' on Linux server, the size displayed is about 2.5 GB.

So I guess 'ls' and 'du' display different things ? What does the 'ls' number mean and what does the 'du' number mean ?

I thought they were supposed to be same.

0 Kudos
vmroyale
Immortal
Immortal

I'm not sure what the differences actually are, but ny experince has been that "ls" won't show the actual usage where "du" will.

Brian Atkinson | vExpert | VMTN Moderator | Author of "VCP5-DCV VMware Certified Professional-Data Center Virtualization on vSphere 5.5 Study Guide: VCP-550" | @vmroyale | http://vmroyale.com
0 Kudos
DSTAVERT
Immortal
Immortal

The VMDK is stored as a sparce file. ls would show how large the file could become, the provisioned size and du shows how much space the file is actually using.

-- David -- VMware Communities Moderator
0 Kudos
bulletprooffool
Champion
Champion

See the answer to this thread:

http://lists.freebsd.org/pipermail/freebsd-questions/2004-July/051385.html

Of course the 'holey files' he talks about is your thin provisioning . . but the thread should allow you to understand the difference.

One day I will virtualise myself . . .
0 Kudos
QNXuser
Contributor
Contributor

Can the smaller size be copied for the purpose of moving to another ESX?  When I download I get the larger provisioned size which is prohibitively large to move to other systems.  I would like to use the VMDK as an 'image' for distribution.  Is this possible?

0 Kudos
DSTAVERT
Immortal
Immortal

You can use the OVF tool to "package" the disk for distribution. It will create a small disk. http://vmware.com/go/ovf

-- David -- VMware Communities Moderator
0 Kudos