Page 1 of 6

March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 18, 2021 4:00 pm
by glessard
This is a setup that works with the December build; after I installed the March 14 build, then `zfs mount` failed for my encrypted filesystem, even after `zfs load-key` had reported success. (This is on Big Sur 11.2.3, with a 2019 iMac.)

Code: Select all
Stuff/Test  encryption             aes-256-gcm       -
Stuff/Test  keylocation            prompt            local
Stuff/Test  keyformat              passphrase        -
Stuff/Test  pbkdf2iters            350000            -
Stuff/Test  encryptionroot         Stuff/Test        -

I had not disabled `keepsyms` yet, if that's relevant.

The error message was unhelpful:
cannot mount 'Stuff/Test': Unknown error: -1

I've now reverted to the December 19th build, sadly.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Fri Mar 19, 2021 8:34 pm
by Jimbo
Is that a USB drive? I don't know whether it might be related, but I'm seeing something strange with my (single disk) USB volumes from time to time - in that zpool import just doesn't see them, even though they're there in diskutil. A few unplugs and plugs later, they're seen. I haven't got a good handle on what is happening yet.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Fri Mar 19, 2021 8:56 pm
by Jimbo
Erk... just retrying and retrying (with the drive plugged in) and eventually is sees the drive and can import.

Something looks racy... this bit of evil shite:

Code: Select all
while sudo zpool import -N Tub; (( $? != 0 )); do :; done


While plugging in the drive will import the pool. That is, a tight busy loop trying to import the pool if the import was not successful.

Yelp!

Update: Once imported the drive seems fine (doing a recieve to it now), so it doesn't seem to be a USB bus/cable/drive issue.

Update 2: I don't see this with USB SSD drives, just spinning rust USB drives.

Update 3: I don't see this happening on Thunderbolt attached spinning rust arrays either.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Mon Mar 22, 2021 3:22 pm
by glessard
Thanks for the question: I indeed left some details out.

My pool is a mirrored pair of SATA (spinning) drives over Thunderbolt 3. This configuration has been rock solid for over a year, including with Big Sur. I seriously doubt a change in the ZFS build exposes some hardware issue.

Note that the portion of my pool that is not encrypted mounted as expected and seemed to work fine.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 25, 2021 3:57 am
by UnConundrum
I'm having a similar problem with two external drives in an enclosure connected by thunderbolt.

My difference is that I can import my pool and I can unlock it, but any attempt to mount it results in:

cannot mount 'tank/backups': Unknown error: -1

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 25, 2021 1:19 pm
by FadingIntoBlue
Same problem here, I could mount the pool in Ubuntu with an older zfs install (and some permission errors), but can't mount at all in Big Sur. Will try on a Catalina zfs 2.0 install in the next day or two.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 25, 2021 4:56 pm
by Jimbo
Hmm...

I don't have this issue. That said, I've created all my encrypted pools with the 14th March build. Were you're pools and encryption set up on an earlier release?

Cheers!
James

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 25, 2021 7:26 pm
by FadingIntoBlue
Were you're pools and encryption set up on an earlier release?


Mine were, possibly even pre 2.00 release for one or two of them, I created them around November last year, so I'm not quite sure. I'll check the history if I can get them to mount. They were all encrypted as part of the pool creation, not just encrypted filesystems on top of the unencrypted pool. That said, I got the unknown error -1 for both the pool filesystem and the child filesystem on the one I was most keen to mount.

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Mar 25, 2021 7:32 pm
by FadingIntoBlue
Were you're pools and encryption set up on an earlier release?


Just checked when I created them, was later than I thought, January 2021, so almost certainly using the December 2020 build of 2.00

Re: March 14th build fails to mount encrypted filesystem

PostPosted: Thu Apr 01, 2021 4:57 pm
by david_szfs
I've experienced what may be the same issue. Unencrypted datasets mount fine, encrypted ones do not. I have a detailed report on GitHub, along with a file-backed pool that has this problem on my system. https://github.com/openzfsonosx/zfs/issues/787