-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Unable to mount encrypted datasets after raw send/recv to new pool #6847
Comments
@tcaputi Can you take a look on this issue? Thank you. |
thanks for the easy script to reproduce the problem. I'm working on a few other things but I should be able to get to this soon. |
This diff should fix it for you. I'll get it up as an official PR soon.
|
After doing a recursive raw receive, zfs userspace performs a final pass to adjust the encryption root heirarchy as needed. Unfortunately, the FORCE_INHERIT ioctl had a bug which caused the encryption root to always be assigned to the direct parent instead of the inheriting parent. This patch simply fixes this issue. Signed-off-by: Tom Caputi <tcaputi@datto.com>
I confirm that this fixes the bug. Thank you! While testing zfs raw send/recv, I stumbled over a question: when using zfs send -R for an encrypted dataset, all descendant datasets of main inherits the crypt key from main. When transferring each dataset step by step (first tank1/main -> tank2/main followed by tank1/main/art -> tank2/main/art...) each dataset has an individual key. All keys are unlocked with the same passphrase, but I can't just load the key for tank2/main and all descendant datasets reuse this key, I've to load each key individually. |
Once the raw receive has completed, you can fixup the heirarchy with |
Okay, all I need is change-key -i. Thanks for the hint. |
After doing a recursive raw receive, zfs userspace performs a final pass to adjust the encryption root hierarchy as needed. Unfortunately, the FORCE_INHERIT ioctl had a bug which caused the encryption root to always be assigned to the direct parent instead of the inheriting parent. This patch simply fixes this issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#6847 Closes openzfs#6848
After doing a recursive raw receive, zfs userspace performs a final pass to adjust the encryption root hierarchy as needed. Unfortunately, the FORCE_INHERIT ioctl had a bug which caused the encryption root to always be assigned to the direct parent instead of the inheriting parent. This patch simply fixes this issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#6847 Closes openzfs#6848
After doing a recursive raw receive, zfs userspace performs a final pass to adjust the encryption root hierarchy as needed. Unfortunately, the FORCE_INHERIT ioctl had a bug which caused the encryption root to always be assigned to the direct parent instead of the inheriting parent. This patch simply fixes this issue. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alek Pinchuk <apinchuk@datto.com> Signed-off-by: Tom Caputi <tcaputi@datto.com> Closes openzfs#6847 Closes openzfs#6848
System information
Describe the problem you're observing
When transferring an encrypted dataset with sub-datasets with raw sends from one pool to another pool, only the direct descendants of the encrypted dataset are mountable. zfs refused to mount sub-datasets of the direct descendants.
Describe how to reproduce the problem
The origin pool dataset configuration is:
When transferring to tank2, the tank2/main/art/raws dataset is not mountable.
I use this script to reproduce the problem:
Try to load a key specific for this dataset (which is nonsense but tried it anyway):
The text was updated successfully, but these errors were encountered: