Zfs properties disappear when moving containers/volumes

I’m aware you can set zfs’ recordsize with zfs.blocksize, but what about other properties? I’d like to tweak logbias, primarycache, atime, etc, even user variables like syncoid:sync to control what will be backed up. But, everythime a container or volume is copied or moved, they all disappear, except the ones that are set via lxc properties.

Any way of setting them once and for all, not having to worry later? Something like zfs.raw=“syncoid:sync=false logbias=…”, perhaps?

If you want them applied to all instances, then setting on the containers dataset should work well. Otherwise, yeah, we could add something like a zfs.raw option on the volumes, though I’m not sure how well that will be handled during migrations or on zfs/kernel version changes.

Yeah, setting the parents might work (i.e. having separate pools for different types of containers), but it’s still pretty clunky, instead of watching for parameters you would be watching for pools, not to mention having to have a separate pool for each combination of parameters.

I was thinking about something as simple as issuing zfs set ${zfs.raw} ${zfs.dataset} after zfs create or receive and if it fails, it fails, it is a low level parameter after all, caveat emptor :slight_smile:

Now that i think of it, a universal pre and post operation hook that can get a few variables expanded (or passed via environment) might be even better, although I already foresee namespace issues. Something like: postmove_hook=‘zfs set… ${zfs.dataset}’, that way you can do anything and shoot yourself in the foot in many various ways if you wish to :slight_smile: