Confused by the doc on zfs copy-on-write (COW) tank

Pardon my ignorance but I am bit confused by the section 11.7.1 of the manual about enabling Copy-On-Write…:face_with_monocle:

In the first section of the zfs setup, my zpool is mounted as /media/BACKUP, and urbackup is storing the backups under /media/BACKUP/urbackup. :ok_hand:

but in the COW sections, some new “tank/images” shows up out of nowhere :scream: and my urbackupfolder is supposed to map some hypothetical “/mnt/BACKUP/urbackup

Am I supposed to create a separate zpool called tank? or is “tank/files” some secret-zfs-linguo that I am supposed to replace with “BACKUP/files” ??? :dizzy_face:

Will keep this confusion in mind when this section is reworked :wink:

tank/files is just some random dataset name (tank being the name always used in the ZFS docs). So it might as well be BACKUP/files (pro tip: keep the dataset + pool name as small as possible because there is some really low limit on dataset name length, e.g. “a/f” for files and “a/i” for images).

ok so…

  1. first of all Thanks for the quick reply!

  2. while re-reading the doc another dozen time something else got me confused… when you state " You should create a separate ZFS dataset" do you mean that I have to create another zfs zpool?? completely separate from the “backup” zpool already mounted on /mnt/BACKUP/ ?

  3. I hope I did the setup right…

  • bought a cheap H/W SAS controller with 512MG of cache and 6 old SAS 3TB drives on ebay.
  • setup the SAS drives as JBOD and enabled cache for read, and write-only-with-battery
    /dev/sdb, c, d, e, f, g
  • setup the backup zpool array as RAIDZ, using a 16GB SSD partition for cache (sda4) mounted on /media/BACKUP

zpool create backup raidz /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg cache /dev/sda4 -m /media/BACKUP

  • Setup the dedup/compression

zfs set dedup=on backup
zfs set compression=on backup

  • setup the images COWs - using my existing big single zpool called backup

echo “backup/images” > /etc/urbackup/dataset
echo “/media/BACKUP/urbackup” > /etc/urbackup/backupfolder

  • setup the files COWs - using my existing big single zpool called backup

echo “backup/files” > /etc/urbackup/dataset_file

  • modify the config to run urbackup as root and restart…

vi /etc/default/urbackupsrv
#change USER="root"all the way at the bottom of the file…
systemctl restart urbackupsrv.service

  • run the test…

$ urbackup_snapshot_helper test
Testing for btrfs…
ERROR: not a btrfs filesystem: /media/BACKUP/urbackup/testA54hj5luZtlorr494
TEST FAILED: Creating test btrfs subvolume failed
Testing for zfs…
ZFS TEST OK
stephane@HAL:/opt$