Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Feb 2016 15:37:04 -0500
From:      Mark Saad <nonesuch@longcount.org>
To:        freebsd-fs@freebsd.org
Subject:   Zvol receive removes properties on import
Message-ID:  <CAMXt9NbftDOG6T%2BX3UT=sxUpZ42Ev_w=ZQqQW_HvCWK8woMKOw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMXt9NbftDOG6T%2BX3UT=sxUpZ42Ev_w=ZQqQW_HvCWK8woMKOw>