-
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
Encrypted dataset created under current SmartOS/Illumos cannot be mounted on Linux, gives Input/output error #13301
Comments
i think it is issue on illumos side - they ae not ported all OpenZFS updates and features. |
I see! So this is simply not something that is expected to work, right? If so, feel free to close this issue. |
I'm not saying it shouldn't be made to work, just that this sounded like the case I cited that people intended to come up with a solution for but AFAIK nobody did. |
@lhuedepohl Could you perhaps apply "#12981" in Linux and check if you can mount it then? Edit: I just saw you tried 2.1.4, where that fix is included. |
They also said a |
In case someone wants to have a look but not go to the trouble with the SmartOS install, you can now download the |
You will need the password: 12345678 |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
Stale bot brought this to my attention, we had similar issues in macOS and added a bit of extra code. I/someone should check if macOS can handle it (and afterwards it should work with Linux... but its a one-way move) |
I haven't had a chance to finish it yet, but the work on illumos is here: https://github.com/jasonbking/illumos-gate/tree/zfs-crypto-dnode and shouldn't be too bad to apply to openzfs. It was designed to be backwards compatible. Unmodified pools will try either approach (I put in a bit to default to the platform's historic behavior) and then set a flag to denote if the project dnode is included in the hash or not. That way older systems that are compatible today stay that way, but systems with the fix can handle either. Additionally (the bit I hadn't done yet) was to add a zpool flag that controls which format new datasets use. Basically the admin stays in control and can keep things backwards compatible if needed. If someone wanted to finish up the bits before I can get back to it, feel free. |
Ah yeah, macOS we try the 3-tuple hash first, and if that fail, check the 2-tuple, if that is ok, carry on. It will then write the 3-tuple when done, hence the one-way. If you have a patch that can remember 2 or 3, that would be good for compatibility |
System information
Observed problem
An encrypted filesystem, it and its ZFS pool created under SmartOS, cannot be mounted under Linux, an attempt gives an `Input/output' error:
Curiously, a 'zfs send --raw zones/secrets | zfs receive zones/secrets2' seems to fix this, the resulting
zones/secrets2
can be mounted, then.How to reproduce the problem
Fortunately, I was now able to recreate this, with a VM installation of SmartOS. I experienced this issue on actual hardware, though. I downloaded the latest iso from
https://us-east.manta.joyent.com/Joyent_Dev/public/SmartOS/20220324T002253Z/smartos-20220324T002253Z.iso
and installed normally on a 20 GB disk image provided to the VM (also tried this with much earlier versions, up to 20200520T174734Z, with the same results). I then created an encrypted filesystem (and a snapshot, not sure if this is relevant, though!) in there, like this
After the shutdown finished, cleanly, I imported the pool on the host:
and then tried to mount the test filesystem, which failed:
Afterwards, there were errors shown in
zpool status
:But as said, the data actually seems to be still there and fine, as it could be revived by a raw send/receive:
No warnings (other than from
zpool status
) were visible in any logs/dmesg. The errors shown inzpool status
vanish after a scrub.Remarks
I am actually not sure about the guarantees you would like to give here, is it expected to be able to mount (encrypted?) datasets from other ZFS flavors? In any case, hope this report helps someone out. I am happy to answer questions or do experiments!
I am also not sure if not SmartOS could be at fault here? But as I get the problems on the Linux side, I start by reporting the issue here.
If the reproduction procedure is too cumbersome I can also provide my test image directly (~200 MB).
Thanks for the good work on ZoL!
The text was updated successfully, but these errors were encountered: