Releasing deleted blocks from a sparse ZVOL

Paul Esson paul.esson at redstor.com
Mon May 14 20:55:11 UTC 2018


Hi Eric,
Thanks for your feedback which sounds encouraging. I'll give that a try.

Regards,
Paul.E


Paul Esson | Redstor Limited
t +44 (0)118 951 5235
m +44 (0)776 690 6514
e paul.esson at redstor.com

________________________________
From: eborisch at alumni.stanford.edu <eborisch at alumni.stanford.edu> on behalf of Eric Borisch <eborisch at gmail.com>
Sent: Monday, May 14, 2018 9:37:43 PM
To: Karli Sjöberg
Cc: Paul Esson; freebsd-fs at freebsd.org
Subject: Re: Releasing deleted blocks from a sparse ZVOL

I've had success in a similar config by attaching the zvol as 'ahci-hd', which shows up as a 'BHYVE SATA DISK' in a BSD guest. With such a guest (running a zpool on the attached device):

kstat.zfs.misc.zio_trim.failed: 0
kstat.zfs.misc.zio_trim.unsupported: 0
kstat.zfs.misc.zio_trim.success: 179883
kstat.zfs.misc.zio_trim.bytes: 13126696960

Also working with a linux guest.

I see the expected tracking of the 'logicalreferenced' size in the host with the ALLOC size in the guest (allowing for upward bias due to using 32k sector sizes on my zvols).

Note that TRIM and UNMAP are two extremely similar but distinct (used for SATA & SCSI, respectively) commands. Both are commonly referred to as 'trim' by layers above the device drivers.

  - Eric


More information about the freebsd-fs mailing list