- Joined
- Feb 15, 2014
- Messages
- 20,194
I've been trying the reproducer script on a machine at work running TrueNAS 13. Nothing so far, but it's slow as molasses due to an ongoing replication (stupidly IOPS bound, I guess, since it's a single RAIDZ vdev).
Note that on FreeBSD/Core GNU-style options for
TrueNAS Core-friendly version of the script below (adapted from Tony Hutter's):
For shells that support it, run arbitrary natural numbers of instances in parallel with
Note that on FreeBSD/Core GNU-style options for
cp are unavailable, so you'll want to remove the "--reflink=never" bit. For systems prior to OpenZFS 2.2, also comment out the opening if block.TrueNAS Core-friendly version of the script below (adapted from Tony Hutter's):
Code:
#!/bin/bash
#
# Run this script multiple times in parallel inside your pool's mount
# to reproduce https://github.com/openzfs/zfs/issues/15526. Like:
#
# ./reproducer.sh & ./reproducer.sh & ./reproducer.sh & ./reproducer.sh & wait
#
#if [ $(cat /sys/module/zfs/parameters/zfs_bclone_enabled) != "1" ] ; then
# echo "please set /sys/module/zfs/parameters/zfs_bclone_enabled = 1"
# exit
#fi
prefix="reproducer_${BASHPID}_"
dd if=/dev/urandom of=${prefix}0 bs=1M count=1 status=none
echo "writing files"
end=1000
h=0
for i in `seq 1 2 $end` ; do
let "j=$i+1"
cp ${prefix}$h ${prefix}$i
cp ${prefix}$i ${prefix}$j
let "h++"
done
echo "checking files"
for i in `seq 1 $end` ; do
diff ${prefix}0 ${prefix}$i
done
For shells that support it, run arbitrary natural numbers of instances in parallel with
for i in {1..n} ; do ./reproducer.sh & done; wait - replace n with your favorite natural number or iterate over a bunch of them - go crazy, more data is more betterer.