Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[syncoid] Feature request - separate argument for ZFS properties #972

Open
Peter2121 opened this issue Dec 18, 2024 · 1 comment
Open

[syncoid] Feature request - separate argument for ZFS properties #972

Peter2121 opened this issue Dec 18, 2024 · 1 comment

Comments

@Peter2121
Copy link

I have a problem when I try to send a dataset with many children to a backup host.

To avoid mounting the datasets received on a backup host, I need to set ZFS property canmount to noauto (using -u does not help as the dataset will be mounted on reboot). So, I use syncoid with argument --recvoptions='-u -o canmount=noauto'. The problem is that some datasets must be synced with their properties (for example, to avoid loosing the information about mountpoints), so --preserve-properties argument must be used as well. Unfortunately, some datasets have ZFS property canmount set to something. For example, in FreeBSD the dataset /usr has canmount set to off. zfs receive command failed in such case: property 'canmount' specified multiple times.

I think that syncoid needs a separate argument to manage zfs properties to set by zfs receive. For example, something like --recvprop='canmount:noauto' (with a possibility to be specified multiple times). The properties set at this manner should override the properties got from the source dataset (for example, in case of /usr, the destination dataset will have canmount=noauto).

I would be happy to help with this, but I'm zero in Perl :(

...But I'm ready to help with testing/debugging ;)

@Peter2121
Copy link
Author

...And there is the same problem on restore - at the same time I need to use --preserve-properties (for example, to restore the mountpoint) and I need to pass --recvoptions='-o canmount=on' to mount the dataset immediately or on reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant