Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Feb 2021 10:28:52 +0100
From:      Infoomatic <infoomatic@gmx.at>
To:        freebsd-fs@freebsd.org
Subject:   Re: FreeBSD 13 BETA3 zfs mount failed
Message-ID:  <a9bf441b-8e35-c7df-a5e4-020aaf3b38e6@gmx.at>
In-Reply-To: <3ffea3bf-a9f9-dfe5-d835-1874da1141e5@gmx.at>
References:  <92cd2855-8765-234e-3763-3811da269704@gmx.at> <f1221ad8-61c8-f2e9-2faf-2c6e910403b0@FreeBSD.org> <47e949d3-2fc4-f581-e8a8-a707a23406ab@gmx.at> <3ffea3bf-a9f9-dfe5-d835-1874da1141e5@gmx.at>

next in thread | previous in thread | raw e-mail | index | archive | help
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@log_spacemap=3Ddisabled -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=3Daes-128-gcm -o keyformat=3Dpassphrase ZPOOL/DATASET" to creat=
e
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 create=
d.

After that, I swapped the disks and created more datasets, so on Linux I
created the dataset "freebsd/linux"=C2=A0 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@blackbox ~]# zfs mount -a
cannot mount 'linux/linuxenc/linux': Input/output error
cannot mount 'linux/freebsdenc/linux': Input/output error

[root@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@blackbox ~]# zpool import
>  =C2=A0=C2=A0 pool: hd012
>  =C2=A0=C2=A0=C2=A0=C2=A0 id: 16225333054044272411
>  =C2=A0 state: FAULTED
> status: The pool metadata is corrupted.
>  =C2=A0action: The pool cannot be imported due to damaged devices or dat=
a.
>  =C2=A0=C2=A0 see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-7=
2
>  =C2=A0config:
>
>  =C2=A0=C2=A0=C2=A0 hd012=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 FAULTED=C2=
=A0 corrupted data
>  =C2=A0=C2=A0=C2=A0 =C2=A0 da0s1=C2=A0=C2=A0=C2=A0=C2=A0 ONLINE
> [root@blackbox ~]# zpool import -f hd012
> cannot import 'hd012': one or more devices is currently unavailable
>
> [root@blackbox ~]# zpool status -v hd012
> cannot open 'hd012': no such pool
>
>
> I will do some more tests and will report here.
>
> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a9bf441b-8e35-c7df-a5e4-020aaf3b38e6>