From owner-freebsd-fs@freebsd.org Thu Feb 18 20:37:06 2016 Return-Path: Delivered-To: freebsd-fs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 299BFAACB3E for ; Thu, 18 Feb 2016 20:37:06 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: from mail-yk0-x230.google.com (mail-yk0-x230.google.com [IPv6:2607:f8b0:4002:c07::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E99B6ACB for ; Thu, 18 Feb 2016 20:37:05 +0000 (UTC) (envelope-from nonesuch@longcount.org) Received: by mail-yk0-x230.google.com with SMTP id u9so26324942ykd.1 for ; Thu, 18 Feb 2016 12:37:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=longcount-org.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=pd5BpvCNButsU2WaWssTS1UzMjj19Kizkx5LSdWcdw4=; b=0QZyVGbHSx6hLRqq4XU8bm7unTFe7p+6aH19e0gHUGZuDFOn4eKNfFqH5DwDQCiLSU f5AzMWvlcS7ohAfHkZCWhxShAy0INyZPvl0stREtU4+e91R0qdGch7KLuE0FtuJYa5St 3xqnUOA13dsFYjDs5zl3x8FCQSXeLGp1C4cV96u9dOT0o+qcb9A09ihPkYTb11ypavSo D8d5PrZ+wd9+7EBE1E7j59UNjz60G+w/k4Hi6m/Y2a3y+hLd/tKnhwjdRyLHR0rJMqEi ID8rfe6NFthnXK/ESsGx8rtbvLU13i7ePL8zsX59yKDqbyozygogDoxkZ/p9mkrr/mzW vVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=pd5BpvCNButsU2WaWssTS1UzMjj19Kizkx5LSdWcdw4=; b=Dw1mgjE5CBecXH5TTc0ANJMXeXRmPOmPR25YYuv4eOB7R9LqLnXkc9PY6ZQhXUZ4G8 fDe+s0R1e11+hhZ//UKcOgPdyhaJpaFnmZerAh3Mvyy4buOLLpaGrApKKsxvvBu8M6S5 RIkaXEvoRjDyT5Y0rV5K+ZB3VknKihbuyqfk5iisr4MpCbZoY8M09bEUGrA/wd4RyZrG 5dfGUj+EG83/5ZFb1tdR2sbMd1cadJIovnu8tNE+IGcjgyTvT/zT8fvMK8ePpVC+TJT0 WZ2zuqzX5Xtb47hyYgFXCfyuLkeuqKAiAnYyW8K33L4EWJvGIRhVHzYnrjUu2Rs4VDSf uArA== X-Gm-Message-State: AG10YORElgb3B6fV8Ae5RVW+a2c2TsEEpjG2jsKeG4pQp143/iQTIuks7MeePivjR3JaqBtF+KjIMa5EFpnSVA== MIME-Version: 1.0 X-Received: by 10.37.45.67 with SMTP id t64mr5971656ybt.170.1455827824764; Thu, 18 Feb 2016 12:37:04 -0800 (PST) Received: by 10.13.214.74 with HTTP; Thu, 18 Feb 2016 12:37:04 -0800 (PST) X-Originating-IP: [38.104.68.66] Date: Thu, 18 Feb 2016 15:37:04 -0500 Message-ID: Subject: Zvol receive removes properties on import From: Mark Saad To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2016 20:37:06 -0000 All I am not sure if this is a bug or if t his is intended. Here is my use case. On 10-STABLE amd64, built last week. I have an application that directly uses a zvol for storage. To make things easy to manage I depend on the refreservation; I don't want to thin provision the zvol IE one with out a refreservation . In 10-STABLE this is the default mode of operations . The short version of the issue is this. When I send the zvol to another server and import it, or send it to a file and delete the original and reimport it locally I loose the refreservation . The newly imported / received zvol is now thin provisioned, or better put has no space guarantee on the zpool for the zvol I just imported. On Freebsd 10-STABLE I do the following tasks root@rangefinder:~ # zfs create -V 10G zroot/testvol make my app do some work on /dev/zvol/zroot/testvol make a few snapshots of this data root@rangefinder:~ # zfs snapshot zroot/testvol@snap0 ... Then I need to send the zvol to another server and work on it there . I first check to see what props are set on the zvol root@rangefinder:~ # zfs get all zroot/testvol NAME PROPERTY VALUE SOURCE zroot/testvol type volume - zroot/testvol creation Thu Feb 18 20:13 2016 - zroot/testvol used 10.3G - zroot/testvol available 885G - zroot/testvol referenced 64K - zroot/testvol compressratio 1.00x - zroot/testvol reservation none default zroot/testvol volsize 10G local zroot/testvol volblocksize 8K - zroot/testvol checksum on default zroot/testvol compression lz4 inherited from zroot zroot/testvol readonly off default zroot/testvol copies 1 default zroot/testvol refreservation 10.3G local zroot/testvol primarycache all default zroot/testvol secondarycache all default zroot/testvol usedbysnapshots 0 - zroot/testvol usedbydataset 64K - zroot/testvol usedbychildren 0 - zroot/testvol usedbyrefreservation 10.3G - zroot/testvol logbias latency default zroot/testvol dedup off default zroot/testvol mlslabel - zroot/testvol sync standard default zroot/testvol refcompressratio 1.00x - zroot/testvol written 64K - zroot/testvol logicalused 30K - zroot/testvol logicalreferenced 30K - zroot/testvol volmode default default zroot/testvol snapshot_limit none default zroot/testvol snapshot_count none default zroot/testvol redundant_metadata all default I send it and re-import it on the other server root@rangefinder:~ # zfs send zroot/testvol@snap3 |gzip -7 > /archive/testvol@snap3.zvol.gz root@rangefinder:~ # zfs destroy -r zroot/testvol ssh magic .... root@depthfinder:~ # gzcat /import/testvol@snap3.zvol.gz |zfs receive zroot/testvol Then I check the props on the new box to insure its all good . root@depthfinder:~ # zfs get all zroot/testvol NAME PROPERTY VALUE SOURCE zroot/testvol type volume - zroot/testvol creation Thu Feb 18 20:20 2016 - zroot/testvol used 1.02G - zroot/testvol available 883G - zroot/testvol referenced 1.02G - zroot/testvol compressratio 1.00x - zroot/testvol reservation none default zroot/testvol volsize 10G local zroot/testvol volblocksize 8K - zroot/testvol checksum on default zroot/testvol compression lz4 inherited from zroot zroot/testvol readonly off default zroot/testvol copies 1 default zroot/testvol refreservation none default zroot/testvol primarycache all default zroot/testvol secondarycache all default zroot/testvol usedbysnapshots 0 - zroot/testvol usedbydataset 1.02G - zroot/testvol usedbychildren 0 - zroot/testvol usedbyrefreservation 0 - zroot/testvol logbias latency default zroot/testvol dedup off default zroot/testvol mlslabel - zroot/testvol sync standard default zroot/testvol refcompressratio 1.00x - zroot/testvol written 0 - zroot/testvol logicalused 1.01G - zroot/testvol logicalreferenced 1.01G - zroot/testvol volmode default default zroot/testvol snapshot_limit none default zroot/testvol snapshot_count none default However at this point I notice we no longer have a refreservation . -- mark saad | nonesuch@longcount.org