Thin Provisioning Disk size

If I understand When we set up a VM disk as "Thin disk", the VM can use all available space in the datastore. So, if that's the case why do we have to specify disk capacity?

Thanks
ds
jskfanAsked:
Who is Participating?
 
mlsbravesConnect With a Mentor Commented:
I see… WHen you set the capacity of HD in Thin provisionning, it is like you are setting up the size limit it can go up to…but that size  limit is not owned by the VM if it is not used...

Correct. Your OS will see a hard drive at the size you set it to and can use up to that size. Just remember you can always make it larger in the future if you need to0.
0
 
mlsbravesConnect With a Mentor Commented:
Thin Provisioning will only use space as it is needed for your VM disk size. So if you make a 40GB disk and your OS uses only 20GB your datastore will have only 20GB of used storage.

If you were to use thick provision and make a 40GB disk it would automatically use all 40GB out of your datastore.

Your datastore is the total storage capacity that you can use for all your VMs. You still have to add a virtual disk for the VM to use.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
AbhilashConnect With a Mentor BloggerCommented:
This provisioned disk will only grow to the limit of space you specify during the creation.
If you create a disk of 100GB you will be able to grow the disk only till 100GB.
0
 
mlsbravesCommented:
You can always increase the disk size as needed.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
this document compares the disk options
in addition to what was already mentioned about thin provisioning, it also explains thick options

About Virtual Disk Provisioning Policies
https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.vsphere.storage.doc_50%2FGUID-4C0F4D73-82F2-4B81-8AA7-1DD752A8A5AC.html
0
 
jskfanAuthor Commented:
OK…so on the screenshot above, the disk space can be used up to 40 GB if needed and available….otherwise it is not allocated….

if a storage space is 100GB and 2 VMs have 40 GB each thick provisioning, and one VM has 40GB Thin provisioning, it will be able to use only 20GB...
0
 
mlsbravesConnect With a Mentor Commented:
The 40 GB is probably the default option. You can technically use up to the datastore capacity.

You should get a warning that there is not enough space available when creating the third VM because your disk volume is larger than the available space on the datastore. I would be careful not to over provision your storage as this can lead to problems later if you use the storage. I generally suggest using thin provision as your backups won't take as long.
0
 
Seth SimmonsConnect With a Mentor Sr. Systems AdministratorCommented:
if a storage space is 100GB and 2 VMs have 40 GB each thick provisioning, and one VM has 40GB Thin provisioning, it will be able to use only 20GB...

it will be less than 20gb
there is a threshold where if the datastore gets critically low the virtual machines on it will be suspended and you will be prompted to either continue (if you resolved the issue outside the vm itself) or stop the guest

You can technically use up to the datastore capacity.

that depends on the block size and vmware version but in some cases yes
0
 
mlsbravesConnect With a Mentor Commented:
that depends on the block size and vmware version but in some cases yes

This is true and I would not recommend using the entire datastore as I have seen issues where the VM will suspend due to disk space issues.
0
 
gheistConnect With a Mentor Commented:
Yes, you can overcommit disk space with thin provisioning and once disk is full all thin provisioned machines stop.
0
 
Gerald ConnollyConnect With a Mentor Commented:
You have to understand that storage is about layers, at the bottom layer is the physical disks, typically spinning discs but becoming more common Solid State Disks, through maybe several layers of RAID to the VM Datastore and then onto the virtual volumes being presented to the VM itself.

When you configure volumes for a VM, the volume can Thick or Thin provisioned. If its Thick provisioned say for 1TB, that means you must have 1TB available in your Datastore, if its Thin provisioned say for 100TB, but you only need 2TB now, you only need to have 2TB available in your Datastore, but as you increase the usage of this volume you need to have the equivalent amount of storage available in your datastore.
0
 
jskfanAuthor Commented:
in the screenshot above the disk space is 40 GB , it is set for thin provisioning…

let 's say the VM at some point uses all 40 GBs and needs more space, and the datastore still has space…would the VM automatically use more than 40 GB , or do we need manually assign the VM more disk space?

thanks
0
 
Seth SimmonsConnect With a Mentor Sr. Systems AdministratorCommented:
2 step process
you would need to extend the disk in vmware; it won't use more than 40gb
then you need to extend the file system in windows (or whatever operating system it is)
both can be done without taking the virtual machine down
0
 
mlsbravesConnect With a Mentor Commented:
in the screenshot above the disk space is 40 GB , it is set for thin provisioning…

let 's say the VM at some point uses all 40 GBs and needs more space, and the datastore still has space…would the VM automatically use more than 40 GB , or do we need manually assign the VM more disk space?

Since you have set the VM hard drive to 40GB, it will not grow larger than 40GB. But as long as you have space on your datastore you can extend(make it larger) it.

Step 1: Select your VM and click Edit Virtual Machine Settings
Step 2: Select your Hard Disk and increase the size to your liking, click ok.
Step 3: Increase the volume size on the OS
Windows Server 2008, Windows Server 2008 R2, Windows Vista, Windows 7, Windows 8 and Windows Server 2012 can expand the volumes from the Disk Management in Computer Management. Right-click on volume and click Extend Volume. For more information, see Microsoft's documentation. Instead of rebooting the guest OS, in Computer Management, right-click Disk Management and select Rescan Disks.

Here's a complete guide that covers the above and more including extending linux systems as well:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004071
0
 
jskfanAuthor Commented:
But there is one thing that Vmware folks do not talk about when it comes to Thin provisioning.

The 40 GB disk space assigned to a VM if it is not completely used, will it be reclaimed by the datastore and given to another VM ?

for instance your datastore is 100GB and you have 3 VMs with thin provisioning disks (30,50,20 GB)

the one with 50 GB used 25 GB and the one with 20 GB uses all 20 GBs , in this case can we extend the disk with another 25 GB which makes it 20+25=45GB?

if so we'll end up with 3 VMs (30,25,45GB)

OR , we cannot extend the disk for one VM until we shrink the disk on the other VM ??
0
 
Seth SimmonsConnect With a Mentor Sr. Systems AdministratorCommented:
if a disk is thin provisioned but you don't use that much capacity, the space is available for anything else.  there is nothing to "reclaim" since it wasn't allocated in the first place

if that 50gb disk is only using 25gb and you extend the 20gb disk an additional 25gb, it will just have a total capacity of 45gb.  the 50gb drive is not affected
0
 
mlsbravesConnect With a Mentor Commented:
When you create a VM there is a hard disk created (either thin provision or thick provision). This will create a .vmdk file that represents your hard drive. This .vmdk file is stored in your datastore.

If you create a hard disk of 40GB with thick provision the .vmdk file (stored on your datasotre) will be 40GB in size. Even if you haven't installed any OS the .vmdk file will still use 40GB of your datastore.

If you create a hard disk of 40GB with thin provision the .vmdk file (stored on your datasotre) will be 0GB. If you install an OS that uses 10GB your .vmdk file will only be 10GB. Your OS will be able to use 40GB since it believes its HD is 40GB.

So:

VM1 (Thick Provision)
HDD Size: 40GB
OS Size: 10GB
vmdk file size: 40GB

VM2 (Thin Provision)
HDD Size: 40GB
OS Size: 10GB
vmdk file size: 10GB

Datastore (This is your total storage pool)
Total capacity: 100GB
Used Storage: 50GB
Available: 50GB

Think of it like pluging in a USB drive into your computer, you have a maximum capacity on your external drive and you can copy as many files as you want until you run out of space.
0
 
jskfanAuthor Commented:
I see… WHen you set the capacity of HD in Thin provisionning, it is like you are setting up the size limit it can go up to…but that size  limit is not owned by the VM if it is not used...
0
 
Gerald ConnollyConnect With a Mentor Commented:
By George i think he's got it!
0
 
jskfanAuthor Commented:
Thank you Guys!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.