FreeBSD 13 BETA3 zfs mount failed

Infoomatic infoomatic at gmx.at
Sun Feb 28 09:30:34 UTC 2021


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?


Regards,

Robert









On 26.02.21 11:40, infoomatic wrote:
> On 26.02.21 09:56, infoomatic wrote:
>> Another scenario: I did the same setup as in my previous mail on BETA3,
>> sent some snapshots to the encrypted dataset on BETA3. I then could
>> however import the the pool in Linux as read-only (feature
>> com.delphix:log_spacemap was missing), could also load-key and read the
>> encrypted dataset.
>
> interestingly, importing the pool read-only on linux destroyed some
> metadata.
>
> The pool cannot be imported in BETA3 any more:
>
> [root at blackbox ~]# zpool import
>     pool: hd012
>       id: 16225333054044272411
>    state: FAULTED
> status: The pool metadata is corrupted.
>   action: The pool cannot be imported due to damaged devices or data.
>     see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-72
>   config:
>
>      hd012       FAULTED  corrupted data
>        da0s1     ONLINE
> [root at blackbox ~]# zpool import -f hd012
> cannot import 'hd012': one or more devices is currently unavailable
>
> [root at blackbox ~]# zpool status -v hd012
> cannot open 'hd012': no such pool
>
>
> I will do some more tests and will report here.
>
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"


More information about the freebsd-fs mailing list