2

After sending a zvol from one pool to another I was alarmed to find that only half the data was "there" (according to REFER). Then I noticed on the sent snapshot that referenced is 302G and logicalreferenced is 150G. But after sending it to a new pool these two values match. I don't understand why this is, and if anything I thought logicalreferenced is supposed to be larger than referenced. The 302G is espiecially confusing because the zvol was populated by sending a 150GB drive over iSCSI using dd.

tank/Win10Root         831G   747G   302G  -
tank/Win10Root@send  referenced            302G                   -
tank/Win10Root@send  logicalreferenced     150G                   -

# zfs send tank/Win10Root@send | zfs recv wd/Win10Root

wd/Win10Root           151G  6.24T   151G  -
wd/Win10Root@send  referenced            151G                   -
wd/Win10Root@send  logicalreferenced     150G                   -

EDIT: Posted logicalused (which is 0) instead of logicalreferenced on accident

These are all the properties for tank/Win10Root. The zvol was created with zfs create -V 512G tank/Win10Root.

@ubuntu1:~$ sudo zfs get all tank/Win10Root | sort
NAME            PROPERTY              VALUE                  SOURCE
tank/Win10Root  available             740G                   -
tank/Win10Root  checksum              on                     default
tank/Win10Root  compression           off                    default
tank/Win10Root  compressratio         1.00x                  -
tank/Win10Root  context               none                   default
tank/Win10Root  copies                1                      default
tank/Win10Root  creation              Sat Nov  4 14:21 2017  -
tank/Win10Root  dedup                 off                    default
tank/Win10Root  defcontext            none                   default
tank/Win10Root  fscontext             none                   default
tank/Win10Root  logbias               latency                default
tank/Win10Root  logicalreferenced     150G                   -
tank/Win10Root  logicalused           150G                   -
tank/Win10Root  mlslabel              none                   default
tank/Win10Root  primarycache          all                    default
tank/Win10Root  readonly              off                    default
tank/Win10Root  redundant_metadata    all                    default
tank/Win10Root  refcompressratio      1.00x                  -
tank/Win10Root  referenced            302G                   -
tank/Win10Root  refreservation        528G                   local
tank/Win10Root  reservation           none                   default
tank/Win10Root  rootcontext           none                   default
tank/Win10Root  secondarycache        all                    default
tank/Win10Root  snapdev               hidden                 default
tank/Win10Root  snapshot_count        none                   default
tank/Win10Root  snapshot_limit        none                   default
tank/Win10Root  sync                  standard               default
tank/Win10Root  type                  volume                 -
tank/Win10Root  used                  831G                   -
tank/Win10Root  usedbychildren        0                      -
tank/Win10Root  usedbydataset         302G                   -
tank/Win10Root  usedbyrefreservation  528G                   -
tank/Win10Root  usedbysnapshots       0                      -
tank/Win10Root  volblocksize          8K                     -
tank/Win10Root  volsize               512G                   local
tank/Win10Root  written               0                      -
chew socks
  • 212
  • 2
  • 8

1 Answers1

1

This is totally a case for checking the man page for ZFS:

referenced

The amount of data that is accessible by this dataset, which may or may not be shared with other datasets in the pool. When a snapshot or clone is created, it initially references the same amount of space as the file system or snapshot it was created from, since its contents are identical.

This property can also be referred to by its shortened column name, refer.

and...

logicalreferenced

The amount of space that is "logically" accessible by this dataset. See the referenced property. The logical space ignores the effect of the compression and copies properties, giving a quantity closer to the amount of data that applications see. However, it does include space consumed by metadata.

This property can also be referred to by its shortened column name, lrefer.

Things to consider:

  • Were your zvols sparse?
  • What were the compression and deduplication properties?
  • What's inside of the zvol?
ewwhite
  • 197,159
  • 92
  • 443
  • 809
  • The man page is actually where I got the idea that `lrefer` should be higher than `refer`. I posted all of the zvol properties above, but the zvol is not sparse and both compression and deduplication are off. The first 150G of the zvol are a block-for-block copy of a 60% full Windows 10 OS drive. – chew socks Jan 27 '18 at 21:52
  • Was the original Windows drive ever full or have 302GB used inside of it? You know that when files are deleted inside of a filesystem on top of a zvol, that space isn't reclaimed, right? – ewwhite Jan 28 '18 at 00:12
  • No, it is physically only a 160GB drive (drive maker's bytes). It was only about 110 full but when I copied it I copied the zeros as well. – chew socks Jan 28 '18 at 20:20