Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Nov 2020 00:11:31 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250816] AWS EC2 ZFS cannot import its own export!
Message-ID:  <bug-250816-227-nWR63RVmu6@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-250816-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-250816-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250816

--- Comment #2 from Gunther Schadow <raj@gusw.net> ---
Testing on other FreeBSD EC2 AMIs

User data to facilitate the test with less manual work:
---------------------------------------------
#!/bin/sh
echo >>/etc/rc.conf
echo 'zfs_enable=3D"YES"' >>/etc/rc.,conf
---------------------------------------------

Here is my test protocol login as ec2-user then cut and paste:
---------------------------------------------
su
sh
uname -a
mkdir zfstc
truncate -s 100M zfstc/0
truncate -s 100M zfstc/1
mkdir zfstd
for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t vnode -f $i) zfstd/$(base=
name
$i) ; done

zpool create -o feature@embedded_data=3Denabled -o feature@lz4_compress=3De=
nabled
-O dedup=3Don -O compression=3Dlz4 testpool raidz $(for i in zfstd/* ; do r=
eadlink
$i ; done)
zpool list
zpool export testpool
zpool import -d zfstd

shutdown -p now
---------------------------------------------

Now the test result:

---------------------------------------------
# uname -a
FreeBSD freebsd 11.4-RELEASE-p3 FreeBSD 11.4-RELEASE-p3 #0: Tue Sep  1 08:2=
2:33
UTC 2020     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERI=
C=20
amd64
# mkdir zfstc
# truncate -s 100M zfstc/0
# truncate -s 100M zfstc/1
# mkdir zfstd
# for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t vnode -f $i)
zfstd/$(basename $i) ; done
#
# zpool create -o feature@embedded_data=3Denabled -o feature@lz4_compress=
=3Denabled
-O dedup=3Don -O compression=3Dlz4 testpool raidz $(for i in zfstd/* ; do r=
eadlink
$i ; done)
# zpool list
NAME       SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEAL=
TH=20
ALTROOT
testpool   176M   186K   176M        -         -     1%     0%  1.00x  ONLI=
NE=20
-
# zpool export testpool
# zpool import -d zfstd
   pool: testpool
     id: 488462546239790676
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

        testpool    ONLINE
          raidz1-0  ONLINE
            md0     ONLINE
            md1     ONLINE
#
# shutdown -p now
Shutdown NOW!
---------------------------------------------

Next, is it an issue with FreeBSD-12 in particular? First I will reproduce =
the
problem on a brand new 12.2 again, this time following the exact same proto=
col
that succeeded with 11.4

---------------------------------------------
ec2-user@freebsd:~ $ su
root@freebsd:/home/ec2-user # sh
root@freebsd:/home/ec2-user # uname -a
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64
root@freebsd:/home/ec2-user # mkdir zfstc
root@freebsd:/home/ec2-user # truncate -s 100M zfstc/0
root@freebsd:/home/ec2-user # truncate -s 100M zfstc/1
root@freebsd:/home/ec2-user # mkdir zfstd
root@freebsd:/home/ec2-user # for i in zfstc/* ; do ln -s /dev/$(mdconfig -=
a -t
vnode -f $i) zfstd/$(basename $i) ; done
root@freebsd:/home/ec2-user #
root@freebsd:/home/ec2-user # zpool create -o feature@embedded_data=3Denabl=
ed -o
feature@lz4_compress=3Denabled -O dedup=3Don -O compression=3Dlz4 testpool =
raidz
$(for i in zfstd/* ; do readlink $i ; done)
root@freebsd:/home/ec2-user # zpool list
NAME       SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEAL=
TH=20
ALTROOT
testpool   176M   167K   176M        -         -     1%     0%  1.00x  ONLI=
NE=20
-
root@freebsd:/home/ec2-user # zpool export testpool
root@freebsd:/home/ec2-user # zpool import -d zfstd
   pool: testpool
     id: 7726589044207947012
  state: UNAVAIL
 status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
   see: http://illumos.org/msg/ZFS-8000-5E
 config:

        testpool                  UNAVAIL  insufficient replicas
          raidz1-0                UNAVAIL  insufficient replicas
            17541269597952794361  UNAVAIL  corrupted data
            14116473632156932352  UNAVAIL  corrupted data
root@freebsd:/home/ec2-user #
root@freebsd:/home/ec2-user # shutdown -p now
Shutdown NOW!
---------------------------------------------

Let's do the 12.2/ARM, perhaps something was screwed up only on the 12.2 am=
d64
build

---------------------------------------------
ec2-user@freebsd:~ $ su
root@freebsd:/home/ec2-user # sh
root@freebsd:/home/ec2-user # uname -a
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  arm64
root@freebsd:/home/ec2-user # mkdir zfstc
root@freebsd:/home/ec2-user # truncate -s 100M zfstc/0
root@freebsd:/home/ec2-user # truncate -s 100M zfstc/1
root@freebsd:/home/ec2-user # mkdir zfstd
root@freebsd:/home/ec2-user # for i in zfstc/* ; do ln -s /dev/$(mdconfig -=
a -t
vnode -f $i) zfstd/$(basename $i) ; done
root@freebsd:/home/ec2-user #
root@freebsd:/home/ec2-user # zpool create -o feature@embedded_data=3Denabl=
ed -o
feature@lz4_compress=3Denabled -O dedup=3Don -O compression=3Dlz4 testpool =
raidz
$(for i in zfstd/* ; do readlink $i ; done)
root@freebsd:/home/ec2-user # zpool list
NAME       SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEAL=
TH=20
ALTROOT
testpool   176M   167K   176M        -         -     1%     0%  1.00x  ONLI=
NE=20
-
root@freebsd:/home/ec2-user # zpool export testpool
root@freebsd:/home/ec2-user # zpool import -d zfstd
   pool: testpool
     id: 4979253895326493489
  state: UNAVAIL
 status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
   see: http://illumos.org/msg/ZFS-8000-5E
 config:

        testpool                  UNAVAIL  insufficient replicas
          raidz1-0                UNAVAIL  insufficient replicas
            3861186839400824362   UNAVAIL  corrupted data
            14304100812262636401  UNAVAIL  corrupted data
root@freebsd:/home/ec2-user #
root@freebsd:/home/ec2-user # shutdown -p now
Shutdown NOW!
---------------------------------------------

So it's obviously 12.2 specifically. Unfortunately there isn't an official =
12.1
that I could try, but a community 12.1-RELEASE AMI

---------------------------------------------
$ su
root@freebsd:/usr/home/ec2-user # sh
# uname -a
FreeBSD freebsd 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  arm64
# mkdir zfstc
# truncate -s 100M zfstc/0
# truncate -s 100M zfstc/1
# mkdir zfstd
# for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t vnode -f $i)
zfstd/$(basename $i) ; done
#
# zpool create -o feature@embedded_data=3Denabled -o feature@lz4_compress=
=3Denabled
-O dedup=3Don -O compression=3Dlz4 testpool raidz $(for i in zfstd/* ; do r=
eadlink
$i ; done)
# zpool list
NAME       SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEAL=
TH=20
ALTROOT
testpool   176M   165K   176M        -         -     1%     0%  1.00x  ONLI=
NE=20
-
# zpool export testpool
# zpool import -d zfstd
   pool: testpool
     id: 13451961690108720630
  state: UNAVAIL
 status: One or more devices contains corrupted data.
 action: The pool cannot be imported due to damaged devices or data.
   see: http://illumos.org/msg/ZFS-8000-5E
 config:

        testpool                  UNAVAIL  insufficient replicas
          raidz1-0                UNAVAIL  insufficient replicas
            7947115053877644123   UNAVAIL  corrupted data
            12584889417144834990  UNAVAIL  corrupted data
#
# shutdown -p now
Shutdown NOW!
---------------------------------------------

Now this is getting interesting! Shall we try 12.0-RELEASE now? Yes! Here is
one that says "12.0-RELEASE amd64 ZFS", in this case I won't even add the u=
ser
data to set zfs_enable=3DYES in rc.conf.=20

---------------------------------------------
$ su
root@freebsd:/usr/home/ec2-user # sh
# uname -a
FreeBSD freebsd 12.0-RELEASE-p13 FreeBSD 12.0-RELEASE-p13 GENERIC  amd64
# mkdir zfstc
# truncate -s 100M zfstc/0
# truncate -s 100M zfstc/1
# mkdir zfstd
# for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t vnode -f $i)
zfstd/$(basename $i) ; done
#
# zpool create -o feature@embedded_data=3Denabled -o feature@lz4_compress=
=3Denabled
-O dedup=3Don -O compression=3Dlz4 testpool raidz $(for i in zfstd/* ; do r=
eadlink
$i ; done)
# zpool list
NAME       SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEAL=
TH=20
ALTROOT
testpool   176M   624K   175M        -         -     1%     0%  1.00x  ONLI=
NE=20
-
zroot     9.50G  2.01G  7.49G        -         -     2%    21%  1.00x  ONLI=
NE=20
-
# zpool export testpool
# zpool import -d zfstd
   pool: testpool
     id: 15013624344781576480
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:

        testpool    ONLINE
          raidz1-0  ONLINE
            md0     ONLINE
            md1     ONLINE
#
# shutdown -p now
Shutdown NOW!
---------------------------------------------

Aaaaand... it's a winner! Maybe I should look for the word ZFS in the title?
What is the significance of whether or not ZFS is mentioned?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250816-227-nWR63RVmu6>