FreeBSD 13 BETA3 zfs mount failed

Andriy Gapon avg at FreeBSD.org
Mon Mar 1 07:41:35 UTC 2021


On 28/02/2021 11:28, Infoomatic wrote:
> Hi again,
> 
> I did a few tests to further investigate this issue. I used 2 disks for
> different setups: with one disk I created a pool under Linux called
> "linux", with one disk I created a pool under FreeBSD 13 BETA3 called
> "freebsd" (but disabled log_spacemap via "zpool create -o
> feature at log_spacemap=disabled -f freebsd gpt/hd003").
> 
> I then created a dataset linux/linux under Linux and linux/linuxenc as
> encrypted dataset under Linux. I did the same with freebsd but with the
> names freebsd and freebsdenc respectiveliy. I used "zfs create -o
> encryption=aes-128-gcm -o keyformat=passphrase ZPOOL/DATASET" to create
> the encrypted dataset. I then did a zfs send|recv to those datasets. So
> the name of the zpool/dataset informs about the system where it was created.
> 
> After that, I swapped the disks and created more datasets, so on Linux I
> created the dataset "freebsd/linux"  and the encrypted dataset
> "/freebsd/linuxenc", furthermore, I did a zfs send|recv to
> "freebsd/freebsd/linux" and "freebsd/freebsdenc/linux". Equivalent
> datasets and zfs send|recv were done under the BETA3 system.
> 
> 
> Summary: under Linux, everything seems to work fine. Under FreeBSD there
> are are the following issues:
> zfs load-key does work with all encrypted datasets, but datasets beneath
> encrypted datasets (it did not matter whether the encrypted dataset was
> created under BETA3 or Linux) that were written using the Linux system
> could not be mounted:
> 
> [root at blackbox ~]# zfs mount -a
> cannot mount 'linux/linuxenc/linux': Input/output error
> cannot mount 'linux/freebsdenc/linux': Input/output error
> 
> [root at blackbox ~]# zfs mount -a
> cannot mount 'freebsd/freebsdenc/linux': Input/output error
> cannot mount 'freebsd/linuxenc/linux': Input/output error
> 
> 
> Should I file a bug? or post this to the openzfs ML?

Thank you for the comprehensive testing.
I think it's best to file a bug.  Maybe even both an openzfs (zol) github issue
and a freebsd bug.  Looks like there is some problem with freebsd crypto.

P.S.
Not sure if you already provided this info -- you don't happen to use hardware
accelerated crypto with ZFS, do you?

-- 
Andriy Gapon


More information about the freebsd-fs mailing list