Comprehensive data protection for all workloads
Post Reply
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

shrink vmdk after activating w2012 dedup

Post by kte »

Hello, maybe not a veeam releated question but I can't find i on the internet and because of this issue my backup are alot bigger

I had a filserver VM in windows 2012 wh was thin provisoned ant took 4 TB out of the 6TB lun
Now I activated the dedup and I gained 50% on 2 volumes , but because of the dedup process the vmdk that almost 5,5 TB is there a way to shrink them again
I saw w2012 does unmap, can In ty a storage vmotion and must I use convert to thin again??
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by dellock6 »

Hi Koen,
are you talking about vSphere or Hyper-V? I know how it works on vSphere but I'd like to be sure before going on.

Anyway, regardless the platform, I'm not sure thin provisioning + space reclaim would be helpful at the end on a deduplicated VM: even if you will be able to reclaim the disk space, at the next execution of the dedup process, it will surely touch so many blocks in the virtual disk and the thin disk will increase again. Unless the deduplication process is only scheduled no more frequently than weekly, I'm not seeing a huge benefit. Also, both dedup and space reclaim will have a high impact on your storage I/O, and in order to complete it with 4 TB disks it will take quite some time; during this period all your VMs on that storage will be impacted...

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by kte »

it is vshere, I have 20 4TG disk so no issue there, but the storage doez thin also and there we are using almowt the whole lun now.
That is the issue before we only use 4 TB now 5,5TB

Koen
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by dellock6 »

got it ok.
Right now the only way to reclaim disk space is to run sdelete inside the guest OS, than run a storage vmotion towards another LUN. UNMAP is only an activity at the storage layer if you are using thin LUNs, so the array can reuse those blocks for other LUNs. There is no way at the moment to shrink the VMDK file apart the converter. VMware has launched SE Sparse disks that can be shrinked, but they are only available for Horizon View and only for linked clones.
Some useful links:
http://www.boche.net/blog/index.php/201 ... deep-dive/
http://cormachogan.com/2012/09/05/vsphe ... rse-disks/

There is a way to create and use SE sparse files even without Horizon View, but is COMPLETELY UNSUPPORTED by VMware so there is even no meaning in giving you the link. I read around many having crashes and stability problems in using those disks in production.

Also, right now snapshots are not supported on this kind of disks, so you cannot run Veeam backups against it.

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by kte »

I thougth that windows 2012 didn't need sdelete anymore, and that he did that manually, the problem is that it is a volume with dedup on it?
In that storage vmotion do you need to put change disk type to thin??

K
dellock6
Veeam Software
Posts: 6137
Liked: 1928 times
Joined: Jul 26, 2009 3:39 pm
Full Name: Luca Dell'Oca
Location: Varese, Italy
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by dellock6 »

Have a look at this thread on this forum:
http://forums.veeam.com/viewtopic.php?f=2&t=18532

About storage vmotion, yes if the source vmdk is thick, you need to force storage vmmotion to thin.

Luca.
Luca Dell'Oca
Principal EMEA Cloud Architect @ Veeam Software

@dellock6
https://www.virtualtothecore.com/
vExpert 2011 -> 2022
Veeam VMCE #1
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by kte »

So i need to do the garbage collection and scrub manually, I guess this is sheduled automatic ?
And then storage vmotion to thi agin, even if my disk where thin , but are fully provisioned now ??

K
VladV
Expert
Posts: 224
Liked: 25 times
Joined: Apr 30, 2013 7:38 am
Full Name: Vlad Valeriu Velciu
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by VladV » 1 person likes this post

There are some methods of shrinking the allocated size of a LUN but it depends on the storage type, LUN type, and VMDK type.

I will give you a couple of examples using our configuration.

We are using NexentaStor as an iSCSI target with 4 LUNs created on it. Each LUN is Thin and has compression enabled. Our VMs have thin disks attached so usually the size is < than the provisioned space.

When reclaiming space by means of Dedup + Garbage collection I am not sure that the freed space is zero out or is just marked as empty. If it marks them with zeroes then Nexentas compression will reduce the occupied space. If not then the space will remain the same.

If you do not have compression then you need to empty the zeroes also. To do this you need to first shrink the size (not the provisioned space) of the VMDK using one of these methods:
1. After zeroing vmotion to thick then back to thin.
2. After zeroing punch the holes in the vmdk http://www.yellow-bricks.com/2011/07/15/punch-zeros-2/ . This means that you need to power off the VM and wait for it to finish.
3. You can use this fling that does everything in one go http://labs.vmware.com/flings/guest-reclaim . Be sure to read the precautions though and test it on an unimportant vm. I had great results with it. You also need to disable CTK for each of the disks.

After shrink the VMDK you can use unmap.

If I did not understand your case correctly please let me know.

Regards
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by kte »

1. After zeroing vmotion to thick then back to thin.
So this is like sdelete ?? stuff that fills the whole disk with zeros, I though windows 2012 did this himself, but I could be mistaken
And the you need to vmotion backup to thin or ??

K
VladV
Expert
Posts: 224
Liked: 25 times
Joined: Apr 30, 2013 7:38 am
Full Name: Vlad Valeriu Velciu
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by VladV »

I was repeating the solution given by Luca in his previous post.

1. Run sdelete -z on the Windows OS (be sure to have the latest sdelete version otherwise to zero-out you may need to use -c)
2. Migrate datastore to Thick Eager Zero.
3. Migrate datastore back to Thin.

If the above does not work you may try the other options. Also check this article which elaborates on option 2 from my previous post.
http://kb.vmware.com/selfservice/micros ... Id=2004155
kte
Expert
Posts: 179
Liked: 8 times
Joined: Jul 02, 2013 7:48 pm
Full Name: Koen Teugels
Contact:

Re: shrink vmdk after activating w2012 dedup

Post by kte »

I will do som testing with some smaller Vm's
Post Reply

Who is online

Users browsing this forum: No registered users and 213 guests