**Summary**: Is a ZFS send/receive always to receive an exact replication of the sending dataset - matching dataset properties included - or is it possible to receive into a newly created dataset with different properties (recordsize, compression etc) that the receiving data (after checksum verification etc.) can then write in to.
For example, if I receive a (non-incremental) dataset whose objects were initially written with a
recordsize=128K
, and receive into a dataset newly created by zfs receive
but that either specifies the option -o recordsize=1M
or inherits from a parent dataset with an current value of recordsize=1M
, will the objects in my new dataset be written with a recordsize of 1M
, or must it be that the objects are written as an exact "replica" of the receiving dataset?
zfs get recordsize tank/files # returns: 128K
# Set parent of receiving dataset to 1M
zfs set recordsize=1M freezer
# Also set at receive time
zfs send tank/files@transfer | zfs receive -o recordsize=1M freezer/files
My question is essentially:
# Query recordsize of objects as written in freezer
???
I understand that checking the recordsize of the new dataset isn't itself an answer as this would just report what the dataset property is _currently_ set to, it doesn't itself say anything about the recordsize for any previous writes. I've tried to examine the objects directly with something like
zdb -dd freezer
but my zfs version (on FreeBSD 9) seems not to accept this.
man zfs
suggests that only 'set-once' properties must match (casesensitivity, normalization, utf8only), but it's not clear to me how objects are written in the general case. I've also checked docs/google but can't seem to get an explicit answer on this behaviour without getting into studying zfs internals.
Asked by wardw
(396 rep)
Oct 2, 2020, 05:39 PM
Last activity: Oct 2, 2020, 06:01 PM
Last activity: Oct 2, 2020, 06:01 PM