Highlighted
Enthusiast
Enthusiast

Shrinking THIN Disk not working with SDELETE and SVMOTION

Hi gang.

Been banging my head on this one.

I have a VM with a THIN provisioned disk, i wanted to reclaim about 30GB of unused space. I followed all the guides. I degraged, then ran sdelete -c c: inside the guest vm. then performed a live SVMOTION to another datastore using THIN as the option. my vmdk file did not shrink....

help me out here, what am i missing.

do i need to perform a SDELETE -z to WIPE before the -c?

everything i'm reading says just need to do -c.

0 Kudos
19 Replies
Highlighted
Contributor
Contributor

I've got the exact same problem over here: http://communities.vmware.com/message/1655285#1655285

Along with one other person. I've logged a support call about it but they are being very slow.

What version of ESX(i) and vCenter version are you running?

0 Kudos
Highlighted
Enthusiast
Enthusiast

ESX 4.1, vCenter 4.1

i was able to shrink this vm after moving it to a NFS datastore, and using the EMC UnifiedStorage plugin for vmware to compress it.

but was never able to shrink it using the older method of SDELETE and sVmotion.

0 Kudos
Highlighted
Enthusiast
Enthusiast

I am pretty sure I have found the solution to this one. It works for me, and makes some sense (it's a bug).

After using "sdelete -c C:", when you Storage vMotion the thin disk to another volume to reclaim the zeroed space, it must be to a volume with a different block size.

Simple as that. Works fine for me.

Jules.

0 Kudos
Highlighted
VMware Employee
VMware Employee

I have done this many times and it worked fine, but I usually use the VMware tools shrink option instead of sdelete. Could you try if that works?

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
Highlighted
Enthusiast
Enthusiast

Every single time I have ever tried to use that, it just says the shrinking has been disabled and refers me to the docs. But doesn't tell me *which* docs 😞

What is the secret to making this feature do anything on vSphere with ESXi servers?

0 Kudos
Highlighted
Enthusiast
Enthusiast

Same problem here.

The sdelete trick does not seem to work any longer on 4.1.

Have also running 4.0 where it works as expected.

Any news on this.

Cheers.

0 Kudos
Highlighted
Enthusiast
Enthusiast

The solution to this one is remarkably simple once you know it.

It took me 2 solid evenings of Storage vMotion traffic to find the key.

You must copy the VM between 2 datastores with a **different block size**.

Then it works fine, assuming you've done an "sdelete -c C:" first.

If all your datastores have the same block size, you'll have to reformat one of them to a different block size to solve this.

Jules.

0 Kudos
Highlighted
Contributor
Contributor

No news goppi, as I previously stated, VMWare do not support this "feature/benefit" so it's game over. However, it will be supported in ESX v5 coming out later this year.

I haven't had a chance to test jfield's theory about different block sizes on 2 different datastores yet. When I get a chance, I'll update this thread.

Thanks

0 Kudos
Highlighted
Enthusiast
Enthusiast

I found another way which works but looks cumbersome.

1.) Do sdelete -c

2.) use vmkfstools to clone the thin disk to 2gbsparse.

3.) use vmkfstools to clone the 2gbsparse disk back to thin.

example:

vmkfstools -i <disktoshrink.vmdk> -d 2gbsparse temp.vmdk

vmkfstools -U <disktoshrink.vmdk>

vmkfstools -i temp.vmdk -d thin <disktoshrink.vmdk>

0 Kudos
Highlighted
Contributor
Contributor

Thanks soooo much jfield! It works with the different block size datastore! Just tested from 4MB to 8MB and works as expected.

If you post the answer over here: http://communities.vmware.com/thread/288184?start=0&tstart=0

I'll award the points to you...

Cheers!

0 Kudos
Highlighted
VMware Employee
VMware Employee

Hmm, to a different block size datastore it works, seems like it depends on the type of datamover that is used. that is weird.

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
Highlighted
Contributor
Contributor

Very weird indeed! And the fact I've been pulling my hair out for months about it and a support case with VMWare didn't resolve it doesn't sound too promising for VMWare Technical Support either!

0 Kudos
Highlighted
VMware Employee
VMware Employee

Let me ask around and see if I can get this validated for you.

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
Highlighted
VMware Employee
VMware Employee

Quick question before I bother the engineers, are you using a VAAI capable array?

0 Kudos
Highlighted
Contributor
Contributor

Think so? It's an EMC CX4-240 and it says on the datastore properties that hardware accelartion is supported.

Thanks

0 Kudos
Highlighted
Enthusiast
Enthusiast

It makes no difference if I use a VAAI array or not (I have one with and

several without).

--

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.

0 Kudos
Highlighted
VMware Employee
VMware Employee

I know. It has to do with the type of datamover that is used. I've asked the engineers to validate my ramblings and will post them tomorrow.

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
Highlighted
VMware Employee
VMware Employee

Okay,

It most definitely has to do with the type of datamover used. When a different blocksize is used for the destination the legacy datamover is used which is the FSDM. When the blocksize is equal the new datamover is used which is FS3DM. FS3DM decides if is will use VAAI or just the software component, in either case unfortunately the zeroes will not be gobbled. I have validated it and reported it to engineering that this is desireable. The team will look into it but unfortunately I cannot make any promises if or when this feature would be added.

Duncan (VCDX)

Available now on Amazon: vSphere 4.1 HA and DRS technical deepdive

0 Kudos
Highlighted
Contributor
Contributor

I SWEAR I saw this work from local to local.

But anyways... NFS!

I get around it by using NFS. Shut it down, move it to NFS, and move it back again.

Probably easier to get your hands on a spare NFS datastore, rather than a datastore with a different block size.

ODLY though, one example was was 5.4gig on the NFS, but once moved back to the local datastore, it grew to 6.4gig!!

Any ideas what happend there?

FYI, I'm just using copy and paste using vSphere. So clearly that is also having the same issue as the vMotion thing.

Cheers

0 Kudos