cannot mount encrypted dataset: Input/output error

Developer discussions.

cannot mount encrypted dataset: Input/output error

Postby Luftwaffle » Mon Feb 20, 2023 12:51 pm

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?
Luftwaffle
 
Posts: 6
Joined: Mon Feb 20, 2023 12:36 pm

Re: cannot mount encrypted dataset: Input/output error

Postby lundman » Mon Feb 20, 2023 5:06 pm

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.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: cannot mount encrypted dataset: Input/output error

Postby Luftwaffle » Tue Mar 14, 2023 3:00 pm

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
Luftwaffle
 
Posts: 6
Joined: Mon Feb 20, 2023 12:36 pm

Re: cannot mount encrypted dataset: Input/output error

Postby mrfusion » Thu May 25, 2023 2:56 pm

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.
mrfusion
 
Posts: 2
Joined: Thu May 25, 2023 2:51 pm

Re: cannot mount encrypted dataset: Input/output error

Postby lundman » Sun May 28, 2023 4:01 pm

Ah thanks for reporting that, we will need to do a resync for 2.1.7 then.
User avatar
lundman
 
Posts: 1335
Joined: Thu Mar 06, 2014 2:05 pm
Location: Tokyo, Japan

Re: cannot mount encrypted dataset: Input/output error

Postby mrfusion » Fri Jun 23, 2023 10:51 am

Thanks!
mrfusion
 
Posts: 2
Joined: Thu May 25, 2023 2:51 pm


Return to OpenZFS on OS X Development

Who is online

Users browsing this forum: Google [Bot] and 16 guests