Hi all,
I am not able to do a replication task from freenas 9.3 to any OpenZFS / ZOL if I enable lz4 compression. (works "fine" between freenas)
Replication of anydatast@auto-foo failed with /usr/local/bin/lz4c: Command not found. cannot receive: failed to read from stream Error 33 : Write error : cannot write compressed block
I was wondering out why zfs receive was calling lz4c not present at that path in any OSX/Linux box. Like Dusan explains a compressed dataset is always sent compressed.
For this reason I did some test anticipated by Dusan:
1) send from v5000, v5 feature@lz4_compress enabled to v5000, v5 feature@lz4_compress disabled is sent compressed and stored compressed
2) send from v5000, v5 feature@lz4_compress enabled to v28, v5 I can still see the feature@lz4_compress, and set it to disabled but it works and is stored compressed! [ zpool create -o version=28 in an updated box]. Strange since v28 afaik shall not have lz4 flag
NAME PROPERTY VALUE SOURCE
delme version - default
delme2 version 28 local
bash-3.2# zpool get all | grep feature
delme feature@async_destroy enabled local
delme feature@empty_bpobj active local
delme feature@lz4_compress active local
delme2 feature@async_destroy disabled local
delme2 feature@empty_bpobj disabled local
delme2 feature@lz4_compress disabled local
3) send from v5000, v5 feature@lz4_compress enabled to v11 pool, v3 ZFS finally gives me error ;)
bash-3.2# zfs send delme@snap | zfs receive delme2/sega
cannot receive new filesystem stream: pool must be upgraded to receive this stream.
warning: cannot send 'delme@snap': Broken pipe
bash-3.2# zfs get all | grep version
delme version 5 -
delme@snap version 5 -
delme2 version 3 -
bash-3.2# zpool get all | grep version
delme version - default
delme2 version 11 local
4) creating a v26 pool makes a v5 ZFS but inside it i can do a dataset with zfs create -o version=4 pool/dataset and it supports lz4 comrpession receive! So I suppose test #3 fails not for the feature flag missing and is not a problem of ZFS version.
I am not able to create directly a v26 (for example) pool with a v4 zfs but I can create a v5 zfs with a older version dataset (any command to do it direvlty)?
I need to make some test with original solaris box or similar to understaind compatibility constraints because of feature flags. I SUPPOSE that if I create a v28 pool in freenas I can send/import it on solaris ONLY IF no lz4 stream is ever received! So a send receive operation might break some compatibility configured during pools creation (v26/v28 pools with no feature can receive comrpessed info and store it compressed as Dusan says.). This might be a problem for someone.
Moreover I am sending in this test huge files filled with zeros that are actually compressed 10:1 or 100:1 but compression and refcompression keeps indicating 1,0% or 1,15%
I am still investigating why lz4c is called by middleware. It shall be scripted in a pipe since I can't see any call to it in zpool history at booth ends.
[I suppose zfs send foo@bar | lz4c | ssh lz4c -d | zfs receive foo/bar]
If that is true that would mean that double compression is done with vaste of resource?
Just to make this post even more boring, I am also having following problem: First send/receive between freenas NEVER works if you flag "Recursively replicate and remove stale snapshot on remote side:"
I must wait first time to get done and after I have to remember to flag it. very annoying. Maybe a bug?
Ciao!
Alessandro