Created
March 29, 2018 05:17
-
-
Save fling-/c66bf1e4a082b5cf9cd4d1106fe6e2bc to your computer and use it in GitHub Desktop.
Script reproducing https://github.com/zfsonlinux/zfs/issues/7365
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -x | |
issue="7365" | |
sdate="`date +%s`" # need a variable path/poolname component as can't reuse the same until reboot | |
tmpdir=/tmp/$issue | |
poolfile=$tmpdir/$sdate.ima | |
poolname=issue-$issue-$sdate | |
mountpoint=$tmpdir/source-$sdate | |
mkdir -p $tmpdir | |
touch $poolfile | |
truncate --size=1G $poolfile | |
echo > /sys/module/zfs/parameters/zfs_max_recordsize 16777216 | |
zpool create -m none -d \ | |
-o feature@large_blocks=enabled \ | |
-O recordsize=16M $poolname $poolfile | |
zfs create $poolname/source -o mountpoint=$mountpoint | |
echo > $mountpoint/large.block # putting a byte in a file | |
truncate --size=16M $mountpoint/large.block # and making it 16M long | |
zfs snap $poolname/source@testing | |
zfs send -L $poolname/source@testing \ | |
| zfs recv -v $poolname/target # hangs here in recv _after_ the 16M block received | |
# does not go below this line | |
zpool destroy $poolname | |
rm $poolfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment