carpeta
Contributor
Contributor

Problems with disk shrink and snapshots

Jump to solution

Hello,

I have a problem with disk shrink. I have a virtual  machine with five disk (all of them thin). In the shrink tab of the  vmware tools appears the message that "shrink is disabled for this  machine". I have checked the article in the link :
http://www.vmware.com/support/ws5/doc/ws_disk_shrink.html
and I think that all the conditions are correct to shrink a disk on this virtual machine:
1. The disk are thin provisioning. I used vmkfstool to convert it to thin.
2. The virtual machine has no snapshots.
3. The virtual machine doesn't contain physical disks.
4. I have test with independent disk in persistent mode and with no independent disk. None of this works.
5. The virtual disk is stored in a LUN.

I  would like to know what I have to do for shrink a disk. I have another  question. The machine has five disks, all of them in thin provisioning.  One disk is of the maximum size, 2TB. If I try to make an snapshot I  receive an error that the file dont size in the destination disk. The  working directory of the virtual machine is in a datastore with 200 GB  of free space. I would like to know if I need a 2TB datastore to make  the snapshot or just need to shrink the disk to 2TB - 16GB (the límit  overhead that comments in the article  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=101238...)

0 Kudos
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
So, really I need a datastore with 2TB of free space?

It's not the free disk space which prevents you from taking a snapshot, it's the possible maximum file size of the snapshot/delta file. Since this file - which contains data plus metadata - could grow to an unsupported size, VMware does not allow to even create such a file. If you want to be able to take snapshots, the maximum provisioned virtual disk size is 2TB minus 16GB (max. size of metadata in the snapshot file) as mentioned in the KB article.

André

View solution in original post

0 Kudos
4 Replies
abirhasan
Enthusiast
Enthusiast
a_p_
Leadership
Leadership

Disk shrinking is only available on hosted products like VMware Workstation, but not on ESXi. To reduce the disk space for a thin provisioned disk you'd need to e.g. zero out the unused disk space in the gust OS and the convert the VM/disk.

Regarding the snapshot issue. If the provisioned size (the size you defined when the disk was created) of the virtual disk exceeds the maximum as mentioned in your question, you will not be able to create a snapshot, no matter how much free disk space you have on the datastore. To solve this you need to resize the virtual disk (e.g. convert the virtual disk or copy the data over to a new, smaller virtual disk).


André

carpeta
Contributor
Contributor

Thank you for your responses,

The virtual machine has 5 disk, all in thin provisioning format. If I  use the datastore browser I can see the 2TB disk that have two columns:

Size: 1599726000 KB
Provisioned Size: 2136746000 KB

So, really I need a datastore with 2TB of free space? I don't understand this requirement, when I make a snapshot in a  virtual machine, the inital size of the snapshot isn't the maximum file  of the disk...why do I need the total size? I think that is a total waste of the  space on my expensive storage...If I only need the snapshot for take a backup (for example) for a short time, do I need a permanently free datastore with all that wasted space?

Thanks

0 Kudos
a_p_
Leadership
Leadership
So, really I need a datastore with 2TB of free space?

It's not the free disk space which prevents you from taking a snapshot, it's the possible maximum file size of the snapshot/delta file. Since this file - which contains data plus metadata - could grow to an unsupported size, VMware does not allow to even create such a file. If you want to be able to take snapshots, the maximum provisioned virtual disk size is 2TB minus 16GB (max. size of metadata in the snapshot file) as mentioned in the KB article.

André

0 Kudos