Page 1 of 1

cannot mount encrypted dataset: Input/output error

PostPosted: Mon Feb 20, 2023 12:51 pm
by Luftwaffle
I am using zfs on most of my disks and frequently move them between OSX (12.6.2 Monterey) and Ubuntu (22.04).
This works fine with single volumes, mirrored and raid sets.
With the most recent upgrade I observed a curious error: encrypted datasets are not cross-compatible.
I can generate a dataset on Ubuntu or OSX and it mounts just fine where I generated it.
Moving it to the other side always fails with the error "cannot mount '[pool/dataset]': Input/output error".
There are no other errors, it accepts the dataset password no problem, but when I type 'sudo zfs mount -a' it fails.
This is repeatable.
Anyone else seeing this error?

Re: cannot mount encrypted dataset: Input/output error

PostPosted: Mon Feb 20, 2023 5:06 pm
by lundman
2.1.6 has work from upstream/linux that is supposed to address the crypto incompatibility issue.

I've put back the macOS compatibility workaround we used to have in the version here:
viewtopic.php?f=26&t=3750&p=12131#p12131

see if that helps you at all.

Re: cannot mount encrypted dataset: Input/output error

PostPosted: Tue Mar 14, 2023 3:00 pm
by Luftwaffle
Sorry that didn't work at all.
What did work was this suggestion:https://github.com/openzfs/zfs/issues/13709
(Scroll down to the first comment from danig-1 commented on Jul 31, 2022 )
Straight forward, with a little twist (if you use sudo):
Code: Select all
sudo zfs send —raw -v [pool/dataset@snapshot] | sudo zfs recv -v [pool/dataset]

Notice the extra sudo. Without it, it can't create a new dataset. Other than that, it worked like a dream. Trying bigger datasets now

Re: cannot mount encrypted dataset: Input/output error

PostPosted: Thu May 25, 2023 2:56 pm
by mrfusion
This pull request https://github.com/openzfs/zfs/pull/14161 should fix "Input/output error" on encrypted datasets https://github.com/openzfs/zfs/issues/13709 and is included in the patchset for 2.1.7: https://github.com/openzfs/zfs/pull/141 ... 25c325b7c8

So I guess/hope next release of OpenZFS on OS X will include it so that raw send|receive will not be necessary anymore.

Re: cannot mount encrypted dataset: Input/output error

PostPosted: Sun May 28, 2023 4:01 pm
by lundman
Ah thanks for reporting that, we will need to do a resync for 2.1.7 then.

Re: cannot mount encrypted dataset: Input/output error

PostPosted: Fri Jun 23, 2023 10:51 am
by mrfusion
Thanks!