ZFS datasets are hierarchical.
I.e. you can stack them and have different settings for each level, per default settings are inherited from parent datasets.
ashift
ashift gibt die Sektor-Größe in Byte als log2 an (4096=212). [^wiki1]
Figure out physical sector size: sudo lsblk -o NAME,MOUNTPOINT,PHY-SEC
For sector size of 4096 just leave it on the default 12 (logical size doesn’t matter).
How I set up on backup PC
Create a ZFS pool with two disks in mirror mode (raid 1), parent dataset with lz4 compression, atime off (access time; not rlly needed, overhead), child dataset (to tank; common name) mounted to /home/max/data with proper ownership:
sudo zpool create -o ashift=12 -f tank mirror /dev/sda /dev/sdbsudo zpool statussudo zfs set compression=lz4 tanksudo zfs set atime=off tanksudo zfs create tank/maxsudo zfs set mountpoint=/home/max/data tank/maxsudo mkdir -p /home/max/datasudo chown -R max:max /home/max/datafindmnt /home/max/datadf -h | grep tank
The status one should show sth like this:
pool: tankstate: ONLINEconfig: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 sda ONLINE 0 0 0 sdb ONLINE 0 0 0