Skip to content

Instantly share code, notes, and snippets.

@tonyhutter
Created April 9, 2024 22:00
Show Gist options
  • Save tonyhutter/74abee1c2ff575730cadda6fc600ac70 to your computer and use it in GitHub Desktop.
Save tonyhutter/74abee1c2ff575730cadda6fc600ac70 to your computer and use it in GitHub Desktop.
test backup to pool with draid
#!/bin/bash
truncate -s 500M /tmp/file{0..105} /tmp/file-special
for i in '-o feature@allow_backup_to_pool=disabled' '-o feature@allow_backup_to_pool=enabled' ; do
echo "--- ARGS: $i : before ---"
sudo ./zpool create -f $i tank draid2:11d:106c:2s-0 /tmp/file{0..105} special /tmp/file-special
sudo ./zfs set compression=off tank
./zpool sync
./zpool get allocated tank
./zpool get allocated tank /tmp/file-special
for j in {1..5} ; do
mkdir /tank/dir$j
tar -C /tank/dir$j -xf /root/linux-6.8.4.tar.xz
done
./zpool sync
echo "--- ARGS: $i : after ---"
./zpool get allocated tank
./zpool get allocated tank /tmp/file-special
./zpool get backup_to_pool tank /tmp/file-special
./zpool destroy tank
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment