ZFS - Setting up ZPool
Introduction
This guide is not complete, and should be re-written when I setup a ZFS Zpool again. However, it should capture some of the issues I had last time.
Finding WWN
The WWN is usually best to use as a unique identifier for the drives then partuuid, since UUID applies to partitions, but WWN is physical drives. You can use the /dev/sdaX however those may change on reboots, rendering the ZPool degraded.
Use this command to list drives and their WWN: lsblk -o name,size,mountpoint,wwn
Keep note of the WWN’s for the drives you want to use
Creating the ZPool
Create the relevant type of ZPool using this command, modified as needed. I’ll create a mirored vdev:
zpool create {NAME} mirror /dev/disk/by-id/{WWN IDENTIFIER} /dev/disk/by-id/{WWN IDENTIFIER}
Viewing Status
Use these two commands to view the status:
zpool status
zpool list
Configure Scrub
It is a good idea to configure a regularly scheduled scrub, such as once or twice a month. The command is: zpool scrub {NAME}