From owner-freebsd-virtualization@freebsd.org Mon May 14 15:33:53 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BCC5DF5A50 for ; Mon, 14 May 2018 15:33:52 +0000 (UTC) (envelope-from paul.esson@redstor.com) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0089.outbound.protection.outlook.com [104.47.2.89]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT TLS CA 4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A94B378F69 for ; Mon, 14 May 2018 15:33:51 +0000 (UTC) (envelope-from paul.esson@redstor.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redstorltd.onmicrosoft.com; s=selector1-redstor-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+CEA6fzTMwu2JD00SPD8qCSwbiwd8zt3a7nV3W8MA9A=; b=HLajRMXMoNVtbtBQr+BRKaQeKzu697vkwXYnPy6ZKmslGjelGtIm8gqepAh8p+rM0ufleo5V/iF6Ahm8Rh2/ZHIi/Av9VBQ5JWYkHYG9Txs5rl2FJG7xv8wLp2XSvOoryyzM6hOCes9sEguz/m2bznTrIN+8w2wtYHDecU0Xrx0= Received: from AM5PR0102MB2578.eurprd01.prod.exchangelabs.com (10.167.168.139) by AM5PR0102MB2804.eurprd01.prod.exchangelabs.com (10.167.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Mon, 14 May 2018 15:33:49 +0000 Received: from AM5PR0102MB2578.eurprd01.prod.exchangelabs.com ([fe80::ac97:828b:b059:2244]) by AM5PR0102MB2578.eurprd01.prod.exchangelabs.com ([fe80::ac97:828b:b059:2244%13]) with mapi id 15.20.0755.018; Mon, 14 May 2018 15:33:49 +0000 From: Paul Esson To: "freebsd-virtualization@freebsd.org" Subject: Releasing deleted blocks from a sparse ZVOL used by bhyve guest Thread-Topic: Releasing deleted blocks from a sparse ZVOL used by bhyve guest Thread-Index: AdPrmH5hpNIx1+usRK2IrQhaQawHng== Date: Mon, 14 May 2018 15:33:48 +0000 Message-ID: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [81.136.184.115] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5PR0102MB2804; 7:1s/8da/BkPtUyTk9D8ETA6KdExbt+mlrcnj1x7PNvdJylnZ7wyuYeXA1atUShkWG7KRKQanLtdU5n9XcNP75sbd43ZfySZA+qRBG5Cc2AISQwPdOtWSas6LWrLoEUCN7b6E2T57I1JrPZmh0A8ASUOZz3rZmn5imPrYdkk7rBtL+UCRjplJdzeI5gOQKhWPeQEECPRy7jDoOyYkx6M1MFOpUo8t8Z2zdSguqQN9P44Lz32YjLemlNc8zU1cnohwA x-ms-exchange-antispam-srfa-diagnostics: SOS; x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(49563074)(7193020); SRVR:AM5PR0102MB2804; x-ms-traffictypediagnostic: AM5PR0102MB2804: authentication-results: spf=none (sender IP is ) smtp.mailfrom=paul.esson@redstor.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(31418570063057)(128460861657000)(254730959083279)(86561027422486)(21748063052155)(81160342030619)(64217206974132)(91638250987450); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(102415395)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(93001095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011); SRVR:AM5PR0102MB2804; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0102MB2804; x-forefront-prvs: 067270ECAF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(39380400002)(346002)(376002)(39850400004)(396003)(42174003)(189003)(199004)(2351001)(81166006)(478600001)(55016002)(236005)(3846002)(74316002)(66066001)(3280700002)(53936002)(9686003)(54896002)(54556002)(53946003)(5250100002)(6306002)(3660700001)(6116002)(8936002)(99936001)(44832011)(81156014)(186003)(790700001)(97736004)(5660300001)(86362001)(7736002)(476003)(8676002)(106356001)(26005)(14454004)(2900100001)(9326002)(105586002)(102836004)(861006)(6916009)(16865895004)(316002)(33656002)(486006)(59450400001)(733005)(6436002)(2906002)(7696005)(6506007)(68736007)(5630700001)(606006)(99286004)(5640700003)(2501003)(25786009)(16866105001)(559001)(579004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0102MB2804; H:AM5PR0102MB2578.eurprd01.prod.exchangelabs.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: redstor.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: /sBe4jBM3B7QunpcJHDcvUseR13SLglVvcNPkZL/NhQnb+Vk/goqndbprw8JmibhDoNYO0QN9dWTV/kTXo1wTHpyA9Kv6zRtRS/nTdG+N6AD+6ABwmoLULtY5M2ujuHMfi2uwnrY0uCL/y7zS1jmDGvfz7oNIKyCFmGcQNEcTB+PXkWH5vkI5OWq2BwrhWr1 spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 94ed23fd-2c79-4f47-a1ba-08d5b9b016d9 X-OriginatorOrg: redstor.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94ed23fd-2c79-4f47-a1ba-08d5b9b016d9 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 May 2018 15:33:49.0131 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 24ac53ae-15a7-4211-afef-61d8f34e2571 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0102MB2804 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 15:33:53 -0000 Hi Folks, I'm attempting to use a sparse ZVOL from a FreeBSD 11.1-RELEASE host as a d= ata disk for a bhyve FreeBSD 11.1-RELEASE guest that in turn uses this devi= ce as the source for a ZFS filesystem. When I delete data from the filesys= tem on the guest this is reflected in its used space, but not in the ZVOL o= n the host. I've read suggestions that the use of a block driver that supp= orts TRIM or SCSi unmap is crucial such as virtio-scsi, but from what I can= tell my vm-bhyve implementation is using virtio - certainly the disk1_type= parameter in the configuration file has a value of "virtio-blk". Can anyone confirm this is indeed the issue and whether it is possible to s= witch to the relevant driver? Or am I barking up the wrong tree altogether= ? Host ZFS Filesystem NAME PROPERTY VALUE SOURCE dc1-hn-01 type filesystem - dc1-hn-01 creation Mon Apr 23 14:35 2018 - dc1-hn-01 used 36.7G - dc1-hn-01 available 78.2T - dc1-hn-01 referenced 201K - dc1-hn-01 compressratio 1.00x - dc1-hn-01 mounted yes - dc1-hn-01 quota none default dc1-hn-01 reservation none default dc1-hn-01 recordsize 128K default dc1-hn-01 mountpoint /export/data/dc1-hn-01 local dc1-hn-01 sharenfs off default dc1-hn-01 checksum on default dc1-hn-01 compression off default dc1-hn-01 atime on default dc1-hn-01 devices on default dc1-hn-01 exec on default dc1-hn-01 setuid on default dc1-hn-01 readonly off default dc1-hn-01 jailed off default dc1-hn-01 snapdir hidden default dc1-hn-01 aclmode discard default dc1-hn-01 aclinherit restricted default dc1-hn-01 canmount on default dc1-hn-01 xattr off temporary dc1-hn-01 copies 1 default dc1-hn-01 version 5 - dc1-hn-01 utf8only off - dc1-hn-01 normalization none - dc1-hn-01 casesensitivity sensitive - dc1-hn-01 vscan off default dc1-hn-01 nbmand off default dc1-hn-01 sharesmb off default dc1-hn-01 refquota none default dc1-hn-01 refreservation none default dc1-hn-01 primarycache all default dc1-hn-01 secondarycache all default dc1-hn-01 usedbysnapshots 0 - dc1-hn-01 usedbydataset 201K - dc1-hn-01 usedbychildren 36.7G - dc1-hn-01 usedbyrefreservation 0 - dc1-hn-01 logbias latency default dc1-hn-01 dedup off default dc1-hn-01 mlslabel - dc1-hn-01 sync standard default dc1-hn-01 refcompressratio 1.00x - dc1-hn-01 written 201K - dc1-hn-01 logicalused 4.12G - dc1-hn-01 logicalreferenced 36.5K - dc1-hn-01 volmode default default dc1-hn-01 filesystem_limit none default dc1-hn-01 snapshot_limit none default dc1-hn-01 filesystem_count none default dc1-hn-01 snapshot_count none default dc1-hn-01 redundant_metadata all default Host ZFS volume - used by vm-bhyve guest NAME PROPERTY VALUE = SOURCE dc1-hn-01/vm/dc1-olbp-sn-11/disk1 type volume = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 creation Wed May 2 14:06 2= 018 - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 used 4.70G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 available 78.2T = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 referenced 4.70G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 compressratio 1.00x = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 reservation none = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 volsize 28T = local dc1-hn-01/vm/dc1-olbp-sn-11/disk1 volblocksize 8K = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 checksum on = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 compression off = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 readonly off = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 copies 1 = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 refreservation none = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 primarycache all = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 secondarycache all = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 usedbysnapshots 0 = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 usedbydataset 4.70G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 usedbychildren 0 = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 usedbyrefreservation 0 = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 logbias latency = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 dedup off = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 mlslabel = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 sync standard = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 refcompressratio 1.00x = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 written 4.70G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 logicalused 2.06G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 logicalreferenced 2.06G = - dc1-hn-01/vm/dc1-olbp-sn-11/disk1 volmode dev = local dc1-hn-01/vm/dc1-olbp-sn-11/disk1 snapshot_limit none = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 snapshot_count none = default dc1-hn-01/vm/dc1-olbp-sn-11/disk1 redundant_metadata all = default Guest ZFS Filesystem NAME PROPERTY VALUE SOURCE dc1-sn-11 type filesystem - dc1-sn-11 creation Wed May 2 15:49 2018 - dc1-sn-11 used 752K - dc1-sn-11 available 26.9T - dc1-sn-11 referenced 176K - dc1-sn-11 compressratio 1.00x - dc1-sn-11 mounted yes - dc1-sn-11 quota none default dc1-sn-11 reservation none default dc1-sn-11 recordsize 128K default dc1-sn-11 mountpoint /export/data/dc1-sn-11 local dc1-sn-11 sharenfs off default dc1-sn-11 checksum on default dc1-sn-11 compression off default dc1-sn-11 atime on default dc1-sn-11 devices on default dc1-sn-11 exec on default dc1-sn-11 setuid on default dc1-sn-11 readonly off default dc1-sn-11 jailed off default dc1-sn-11 snapdir hidden default dc1-sn-11 aclmode discard default dc1-sn-11 aclinherit restricted default dc1-sn-11 canmount on default dc1-sn-11 xattr off temporary dc1-sn-11 copies 1 default dc1-sn-11 version 5 - dc1-sn-11 utf8only off - dc1-sn-11 normalization none - dc1-sn-11 casesensitivity sensitive - dc1-sn-11 vscan off default dc1-sn-11 nbmand off default dc1-sn-11 sharesmb off default dc1-sn-11 refquota none default dc1-sn-11 refreservation none default dc1-sn-11 primarycache all default dc1-sn-11 secondarycache all default dc1-sn-11 usedbysnapshots 0 - dc1-sn-11 usedbydataset 176K - dc1-sn-11 usedbychildren 576K - dc1-sn-11 usedbyrefreservation 0 - dc1-sn-11 logbias latency default dc1-sn-11 dedup off default dc1-sn-11 mlslabel - dc1-sn-11 sync standard default dc1-sn-11 refcompressratio 1.00x - dc1-sn-11 written 176K - dc1-sn-11 logicalused 153K - dc1-sn-11 logicalreferenced 55K - dc1-sn-11 volmode default default dc1-sn-11 filesystem_limit none default dc1-sn-11 snapshot_limit none default dc1-sn-11 filesystem_count none default dc1-sn-11 snapshot_count none default dc1-sn-11 redundant_metadata all default Regards, Paul Esson | Redstor Limited t +44 (0)118 951 5235 | m +44 (0)776 690 6514 e paul.esson@redstor.com www.redstor.com [http://partners.redstor.com/files/redstor_email_signatures_linkedin_icon_p= adding.png][http://partners.redstor= .com/files/redstor_email_signatures_twitter_icon_padding.png][http://partners.redstor.com/files/redstor_email_signatures= _facebook_icon_padding.png][http://partn= ers.redstor.com/files/redstor_email_signatures_youtube_icon_padding.png] [http://partners.redstor.com/files/NEW_logo_larger.png] [cid:image001.jpg@01D3EB9E.9D818E70]