[Bug 250816] AWS EC2 ZFS cannot import its own export!
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Nov 3 00:11:31 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250816
--- Comment #2 from Gunther Schadow <raj at 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="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/$(basename
$i) ; done
zpool create -o feature at embedded_data=enabled -o feature at lz4_compress=enabled
-O dedup=on -O compression=lz4 testpool raidz $(for i in zfstd/* ; do readlink
$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:22:33
UTC 2020 root at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/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 at embedded_data=enabled -o feature at lz4_compress=enabled
-O dedup=on -O compression=lz4 testpool raidz $(for i in zfstd/* ; do readlink
$i ; done)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
testpool 176M 186K 176M - - 1% 0% 1.00x ONLINE
-
# 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 protocol
that succeeded with 11.4
---------------------------------------------
ec2-user at freebsd:~ $ su
root at freebsd:/home/ec2-user # sh
root at freebsd:/home/ec2-user # uname -a
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC amd64
root at freebsd:/home/ec2-user # mkdir zfstc
root at freebsd:/home/ec2-user # truncate -s 100M zfstc/0
root at freebsd:/home/ec2-user # truncate -s 100M zfstc/1
root at freebsd:/home/ec2-user # mkdir zfstd
root at freebsd:/home/ec2-user # for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t
vnode -f $i) zfstd/$(basename $i) ; done
root at freebsd:/home/ec2-user #
root at freebsd:/home/ec2-user # zpool create -o feature at embedded_data=enabled -o
feature at lz4_compress=enabled -O dedup=on -O compression=lz4 testpool raidz
$(for i in zfstd/* ; do readlink $i ; done)
root at freebsd:/home/ec2-user # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
testpool 176M 167K 176M - - 1% 0% 1.00x ONLINE
-
root at freebsd:/home/ec2-user # zpool export testpool
root at 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 at freebsd:/home/ec2-user #
root at 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 amd64
build
---------------------------------------------
ec2-user at freebsd:~ $ su
root at freebsd:/home/ec2-user # sh
root at freebsd:/home/ec2-user # uname -a
FreeBSD freebsd 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC arm64
root at freebsd:/home/ec2-user # mkdir zfstc
root at freebsd:/home/ec2-user # truncate -s 100M zfstc/0
root at freebsd:/home/ec2-user # truncate -s 100M zfstc/1
root at freebsd:/home/ec2-user # mkdir zfstd
root at freebsd:/home/ec2-user # for i in zfstc/* ; do ln -s /dev/$(mdconfig -a -t
vnode -f $i) zfstd/$(basename $i) ; done
root at freebsd:/home/ec2-user #
root at freebsd:/home/ec2-user # zpool create -o feature at embedded_data=enabled -o
feature at lz4_compress=enabled -O dedup=on -O compression=lz4 testpool raidz
$(for i in zfstd/* ; do readlink $i ; done)
root at freebsd:/home/ec2-user # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
testpool 176M 167K 176M - - 1% 0% 1.00x ONLINE
-
root at freebsd:/home/ec2-user # zpool export testpool
root at 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 at freebsd:/home/ec2-user #
root at 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 at 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 at embedded_data=enabled -o feature at lz4_compress=enabled
-O dedup=on -O compression=lz4 testpool raidz $(for i in zfstd/* ; do readlink
$i ; done)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
testpool 176M 165K 176M - - 1% 0% 1.00x ONLINE
-
# 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 user
data to set zfs_enable=YES in rc.conf.
---------------------------------------------
$ su
root at 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 at embedded_data=enabled -o feature at lz4_compress=enabled
-O dedup=on -O compression=lz4 testpool raidz $(for i in zfstd/* ; do readlink
$i ; done)
# zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH
ALTROOT
testpool 176M 624K 175M - - 1% 0% 1.00x ONLINE
-
zroot 9.50G 2.01G 7.49G - - 2% 21% 1.00x ONLINE
-
# 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?
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list