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

zfs send fails on encrypted datasets (support raw send) #51

Open
FireStormOOO opened this issue Dec 19, 2023 · 0 comments
Open

zfs send fails on encrypted datasets (support raw send) #51

FireStormOOO opened this issue Dec 19, 2023 · 0 comments

Comments

@FireStormOOO
Copy link

cannot send nvme1/[email protected]: encrypted dataset nvme1/vm-7002-disk-0 may not be sent with properties without the raw flag

From the man pages: "If the -R flag is used to send encrypted datasets, then -w must also be specified."
the -w (raw) flag is equivalent to adding -Lec, which is large block, embed, and compression respectively.

It's not immediately obvious to me how to go about this generally. Adding the w flag gets the data copied but the receiving system won't have the key without extra steps. Removing the R flag seems worse. Simply sending the key too is not quite right; a typical zfs encryption setup will have the VM's volumes inheriting encryption settings from the containing dataset and it'd be odd if that wasn't true for a migrated VM.

It looks like this would be possible, at least in my setup, by running zfs change-key on the source dataset to break the inheritance and setting a temporary key, doing a raw send, loading temp keys for the dataset over ssh, and then running zfs change-key -i on both to have the dataset resume inheriting keys from the parent. This would be security-equivalent to just piping the raw decrypted data over SSH, but you'd get all the ZFS snapshots and nice-to-haves intact - plus it'd send compressed.

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