[zfs-discuss] windows on thin provision zvol: how to force trim?

Richard Laager rlaager at wiktel.com
Tue Oct 15 21:33:46 EDT 2013

On Tue, 2013-10-15 at 12:44 +0100, Gordan Bobic wrote:
> I don't think they are expected to shrink.

I disagree; they should shrink, though I'm not sure I've tested this on
Linux. I'm pretty confident I've personally tested this on OpenIndiana,
but it was a while ago.

Ivan: When you say they aren't shrinking, what are you looking at? Some
things that may confuse you:

1) zvols have a refreservation by default. So either make them sparse or
make sure you're looking at the right sort of space accounting in ZFS.
Since you noted the -s flag, this probably isn't your issue.

2) ZFS doesn't show freed space immediately. Are you waiting at least
until the next TXG flush (5 - 30 seconds later)? If you've waited a few
minutes, this isn't the issue.

3) Do you have any snapshots of the zvol? If so, make sure you're
looking at the right space accounting in ZFS.

If you're still not able to make them shrink, let me know. I'll see if I
can reproduce it, and maybe dig into the code (or ask someone) to see if
the zvol accepts TRIMs and converts them into the appropriate zfs space
freeing function.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20131015/e1c10e21/attachment.sig>

More information about the zfs-discuss mailing list