VMware Cloud Community
microkid
Hot Shot
Hot Shot

Thin provisioned disk moved to other datastore becomes thick provisioned?

I had to move a couple of VM's from one datastore to another because of a disk swap. After copying them back I noticed it took forever. What happened? The VM's had thin provisioned disks, and after being copied to the other datastore they were thick provisioned. So this only cost me must more time to copy, but it also wastes valuable disk space. I would like that thin provisioned disks stay thin provisioned also after copying.

Is this by design or is this a bug?

Reply
0 Kudos
26 Replies
ehinkle
Enthusiast
Enthusiast

Were your datastores the same type or where you moving them from NFS datastore to an iscsi, local or fc datastore?

Reply
0 Kudos
Ryan2
Enthusiast
Enthusiast

Option during migration allows for conversion or retention of the disk format (thick vs. thin). Ensure you select the correct option when moving the disk resources and see if the issue remains...

Reply
0 Kudos
microkid
Hot Shot
Hot Shot

I moved the VM's on ESXi between two datastores on local storage. I moved them using the datastore browser, so there is no option to choose for retention or conversion.

Reply
0 Kudos
Ryan2
Enthusiast
Enthusiast

ESXi without any VMotion options - you'd have to shut down the VM to enable migration. But that said, if you use the wizard instead of the datastore browser, you get an option to move the disk resource and convert or maintain disk format...

Reply
0 Kudos
microkid
Hot Shot
Hot Shot

Well, maybe there's a wizard in ESX, but I could not fine one in ESXi Smiley Happy

Reply
0 Kudos
Penic_Albin
Hot Shot
Hot Shot

Microkid did you try with Migrate option? There is vMotion and storage vMotion. Smiley Happy What type of licence you have? If you have less than Enterprise licence you dont have storage vMotion

AP

If you find this information useful, please award points for "correct" or "helpful".
Reply
0 Kudos
microkid
Hot Shot
Hot Shot

I have the free ESXi, so no license and no sVmotion. But still, that doesn't explain why a thin provisioned disk is converted to thick when copied to another location. It's just a matter of copying the file, which is thin provisioned.

Reply
0 Kudos
Penic_Albin
Hot Shot
Hot Shot

microkid, every time you use move operation from datastore browser this will change thin disk to thick disk. I can not see solution for your problem. I think that in background of this process is vmkfstools command and this comand dont support thin disk.

If you find this information useful, please award points for "correct" or "helpful".
Reply
0 Kudos
GeorgeMahesh
Contributor
Contributor

While creating a copy of a virtual disk or raw disk. The copy will be in the specified disk format (can be specified in case of vmkfstools -d) or the default disk format is pre-allocated which means it will take all the disk space configured for the vmdk in the vmx.

Reply
0 Kudos
JaroF
Enthusiast
Enthusiast

I have the same problem, BUT:

Moving disk to some datastores keeps it thin provisioned, to others it gets thick. I think it is some sort of a bug.

I have the datastores on local storage, same PERC6 controller, different luns. I have copied the disk over and over to see when it happens.

I have been using storage vmotion, and also a simple copy/move of the vmdk file itself.

What I found out is that if I copy a thin provisioned disk from a datastore having 1MB block size to 8MB block size one, it gets THICK - actually, it is still marked as thin, only the size of the file is its full size.

If I copy it to the datastore with same block size it stays thin. It does not matter if I use storage vmotion or just move / copy from the datastore browser.

I also tried to copy it back to a datastore with 1Mb block size, and yes, the file was small again.

Is this by design? I actually think it is some kind of a bug.

Could you check to see if your datastores had different block size?

Reply
0 Kudos
RParker
Immortal
Immortal

they were thick provisioned. So this only cost me must more time to copy, but it also wastes valuable disk space

I understand time savings during copy, but space saving AFTER copy it's like writing checks, just because it doesn't clear NOW doesn't mean it won't clear SOON, and if you don't have the money to cover it will bounce. Thin provision is the same thing you are writing checks on a storage with less resources to cover it, because if ALL your VM's get used you have a problem, that's called over allocation. So it's not wasting valuable space IF you provision accordingly. That's just called good management of resource.

300G of space and 30G allocated is space for 10 VM's. If you try to put 20 VM's and they are all thin provisoned, you should account for how much space the were provisioned for, not how much they are NOW.

Also how did you make them thin in the first place?

Reply
0 Kudos
JaroF
Enthusiast
Enthusiast

Since I am not the original poster, I will just try to say what I think is the problem here. It is not a problem of what/how/why to thin provision. We all know the downsides.

The problem is that a THIN provisioned disk after its moved to another datastore becomes a THICK provisioned one (actually size goes up, it is still marked as thin).

This is not how it should be. File (acutal vmdk) on one datastore is 11GB big and after moving it to another datastore becomes a 30GB one. Nothing else changes, everything on local storage, it can be copied with storage vmotion (live) or just by copying the actual file with databrowser (offline), same thing. It happens to me too. I was looking for a solution and found this thread.

Reply
0 Kudos
microkid
Hot Shot
Hot Shot

Well, I kinda solved it. I enabled SSH on the ESXi console and then used vmkfstools to convert all disks back to thin again. Removed the old disk from the VM and added the new thin disk. All works as expected. I also dropped a possible bug report at my Vmware contact.

Reply
0 Kudos
gibsurfer84
Contributor
Contributor

I have encountered the same issue but when I download a VM (say from a test server that we want to put into a production server) to the hard drive of a PC running the VI Client to then upload to the production datastore. The drives become THICK provisioned and are not THIN even though the VM reports it as THIN. We had a VM that was set to have a large VMDK and our workstations don't have enough space to handle the THICK VMDK.

Is there fix or trick for this or is this just a undocumented feature?

Reply
0 Kudos
microkid
Hot Shot
Hot Shot

Reply
0 Kudos
bulletprooffool
Champion
Champion

This is by design - in ESX3i moving a VM converts it to thick disk.

In vSphere, you can use the 'migrate storage' option (sVMotion) - this will allow you to keep the same format of disk, or convert thin to thick, or convert thick to thin. Simply right click the VM and select migrate, then migrate the storage.

One day I will virtualise myself . . .
Reply
0 Kudos
JaroF
Enthusiast
Enthusiast

This is the exact problem - IT DOES NOT ! Migrate storage option as you mention does not keep the same format, it changes it to thick! This is the problem the discussion is here about.

Reply
0 Kudos
Ryan2
Enthusiast
Enthusiast

I think it's been said already. If you're looking to move, download, or migrate storage of a vmdk AND KEEP THE FORMAT OF THE DISK THIN, then you must enable a VMkernel port and use Storage VMotion to retain disk format. This feature (via GUI in vSphere 4.0) works as advertised. I've used this feature extensively to include systems with mixed disk formats (ie. thin and thick) and retention of the disk type is kept when using the migration wizard. ESXi will allow this function as well, but you must enable Storage VMotion through licensing and configure a VMkernel port for VMotion use.

Good luck.

Reply
0 Kudos
JaroF
Enthusiast
Enthusiast

I will just forget about it. Have enough storage but still:

1) I am using ESXI 4.0

2) Have enabled storage vmotion through licensing /vmkernel port of course

In some cases (depending on datastore block size) the thin format is not kept, the disk after being moved changes to THICK by SIZE but is still MARKED as THIN. After moving it back to the original datastore, its size gets back to its thin size again.

For sure a bug of some sort.

Reply
0 Kudos