added test for preserving recordsizes

This commit is contained in:
Christoph Klaffl 2019-09-25 18:34:26 +02:00
parent 381560a320
commit 107545ce00
No known key found for this signature in database
GPG Key ID: 8FC1D76EED4970D2
1 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,32 @@
#!/bin/bash
# test resumable replication where the original snapshot doesn't exist anymore
set -x
set -e
. ../../common/lib.sh
POOL_IMAGE="/tmp/syncoid-test-7.zpool"
MOUNT_TARGET="/tmp/syncoid-test-7.mount"
POOL_SIZE="1000M"
POOL_NAME="syncoid-test-7"
truncate -s "${POOL_SIZE}" "${POOL_IMAGE}"
zpool create -m none -f "${POOL_NAME}" "${POOL_IMAGE}"
function cleanUp {
zpool export "${POOL_NAME}"
}
# export pool in any case
trap cleanUp EXIT
zfs create "${POOL_NAME}"/src
zfs create -o recordsize=16k "${POOL_NAME}"/src/16
zfs create -o recordsize=32k "${POOL_NAME}"/src/32
zfs create -o recordsize=128k "${POOL_NAME}"/src/128
../../../syncoid --preserve-recordsize --recursive --debug --compress=none "${POOL_NAME}"/src "${POOL_NAME}"/dst
zfs get recordsize -t filesystem -r "${POOL_NAME}"/dst