ZFS Preparing a HDD in an USB3 enclosure with ZFS for backup purposes

I decided to create external HDD with ZFS for backups. I would like to make sure that my preparation process of HDD is correct or know suggestions on what to do better. The HDD size is 4 TB and 4 KiB sector sized.

Code:
# gpart create -s GPT da0
# gpart add -a 4k -t freebsd-zfs -l backup da0

# sysctl vfs.zfs.min_auto_ashift=12

# zpool create -O compression=lz4 -O atime=off -m /media/backup -f zdisk1 gpt/zdisk1

# zfs create -o copies=2 backup/first-dataset

I am confused with zpool property cachefile. Is if mandatory or useful to set cachefile property for pools on an external HDD?
# zpool set cachefile=/mnt/boot/zfs/zpoll.cache backup
 
Is if mandatory or useful to set cachefile property for pools on an external HDD?

Not mandatory.

Here, for a pool on a mobile HDD:

Code:
% lsblk da2
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
da2              0:209 932G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da2p1          0:210 932G freebsd-zfs                           gpt/Transcend <ZFS>
  <FREE>         -:-   712K -                                                 - -
% zpool get cachefile Transcend
NAME       PROPERTY   VALUE      SOURCE
Transcend  cachefile  -          default
%

<https://openzfs.github.io/openzfs-docs/man/master/7/zpoolprops.7.html#cachefile>
 
Back
Top