-
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
Filesystem created via zfs send --raw between encrypted roots fails to mount #6624
Comments
Furthermore, sending a filesystem that is a grandchild of an encryption root does not result in any errors but also cannot be mounted:
Results in:
The filesystem is not mounted:
So let's load the key with
However, this time it does create a new encryptionroot as I would have expected:
|
Also; please advise if I will need to destroy these filesystems and re-transfer, or if we can make them mountable after some patches to fix these issues. |
@stewartadam there are some additional fixes/cleanup in #6595 pending review but I'm not sure any of them address your issue. @tcaputi can you please look at this issue and advise. |
Ive figured out the issue here. Userspace is calling the hidden FORCE INHERIT command when it shouldn't be. Specifically, top-level datasets with properties should never be issued this command. I will incorporate the fix into #6595 tomorrow morning. @stewartadam Thank you very much for finding this. The easiest way to resolve this issue will be to resend the data. If this data is particularly important to you and replacing it would be extremely difficult, I can probably provide you some code for a small binary that will call the FORCE NEW KEY command (the opposite of FORCE INHERIT) which should allow you to mount the dataset again. Send me an email if that is something you would like to do. Otherwise I should have this integrated tomorrow. |
I have implemented the fix for this and should have it added to #6595 today. For the documentation, the man page currently says this about nested encryption roots:
Is this good enough, or is there something else that needs to be clarified? As far as adding validation goes, this is actually a bit harder than it seems. We do have validation for most basic kinds of raw send / recv in the zfs test suite. However, there are a ton of variations here and it isnt currently feasible to test them all. I can add testing for this particular issue now, but long-term I think we need some way to exhaustively check all of the options when it comes to send / recv. |
Thanks @tcaputi for the fast fix! I can re-transfer the data from backup worst case, but it's ~7TB so would take a long while - will shoot you an email. Re: documentation, I think we should further clarify this sentence:
That makes it sound like I need to change keyformat in order to force a new encryption root -- what if I would like both the parent and child root to both use a |
What if we just add a sentence afterwards:
|
May I suggest:
It would be clearer too if keyformat, encryption and keylocation showed the encryption root it inherited from in |
This wording isn't exactly correct. For instance, you can specify a new value for
Matt and I talked for a long time about this. The problem is that these values don't work like regular inherited values.
Because of all these complications, Matt and I eventually settled on the |
Gotcha, that makes sense. For the original man page update, I think avoiding words that imply the need for a different/change setting would be clearer while remaining factually accurate:
It would be good to mention something about the behavior of encryption properties with regards to inheritance as well, perhaps something like this (but my wording maybe could be better?) to the existing sentence under the
|
How is this wording for the entire paragraph:
|
+1 very clear! |
hi, what is status of this update? |
The man page update was merged along with #6595. Closing this issue. Thanks for finding it @ikozhukhov |
Hello. I'm using /lib/modules/4.18.0-17-generic/extra/zfs/zfs/zfs.ko version: 0.8.3-1 and experience still the same issue. In my case the transfer is also quite big (10TB). |
@cumafo All of this was merged 2 years ago and should be in any recent version of zfs. If you are experiencing an issue similar to this it would probably be best if we treated it as a new bug. Can you create a new issue with all of your symptoms / steps to reproduce? |
Hello and thanks for quick attention.
Since things are a bit urgent in the middle of an big migration, I had to do send/receive of the individual file systems and that is ongoing.
As soon as I have the migration in place (end of next week), I will try to reproduce with a smaller dataset and document every step.
Regards
Curt.
From: Tom Caputi <[email protected]>
Reply to: openzfs/zfs <[email protected]>
Date: Saturday, 2 May 2020 at 12:21
To: openzfs/zfs <[email protected]>
Cc: Curt Lestrup <[email protected]>, Mention <[email protected]>
Subject: Re: [openzfs/zfs] Filesystem created via zfs send --raw between encrypted roots fails to mount (#6624)
@cumafo<https://github.com/cumafo> All of this was merged 2 years ago and should be in any recent version of zfs. If you are experiencing an issue similar to this it would probably be best if we treated it as a new bug. Can you create a new issue with all of your symptoms / steps to reproduce?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#6624 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACXETTWDEKOSE4OS74HDMLDRPPXY5ANCNFSM4D2IZGBA>.
|
System information
I've installed SPL from the upstream f26 repo and compiled 0.7.1 from source, patching in:
Transferring a filesystem between two encryption roots with
zfs send --raw
succeeds, but cannot be mounted.Results in:
Attempting to import all keys fails to request keys for the transferred filesystem:
In this scenario I would expect the raw transfer to result in a new encryption root and then
zfs load-key
would to prompt for bothreplica/encrypted
andreplica/encrypted/myfiles
, but that's clearly not the case:We should clarify (a) if nested encryption roots are supported and (b) validate raw transfer between encrypted filesystems.
The text was updated successfully, but these errors were encountered: