ZFS

This section is about the Z File System

Reference URL

ZFS tunning

When we create vdev and zpools, we should always reference the unique identifier of the disk or partition. This is because device names are dynamically created during the boot sequence depending on which devices are available. So, if a particular disk such as sda is not useable, what was sdb will replace sda.

Commands

Always use the unique ID of the disk when creating a zpool as shown below.

FreeBSD sudo zpool create -f -m /zstore/x250pool -o compatibility=ubuntu-22.04 x250pool raidz1 ada1p1 diskid/DISK-W624R9ERp1 diskid/DISK-W624R9ERp2

To find out the unique partition labels: Linux lsblk -o NAME,PARTUUID,PATH,FSTYPE,LABEL,UUID,PARTTYPENAME,PARTLABEL,PARTUUID

../../_images/lsblk-output.png

Output of the lsblk command

To set a label for the partition: Linux e2label /dev/sdb1 “My Label”