This article aims to let the reader know how to install ZOL (OpenZFS on Linux) on Ubuntu Linux
Install required packages
sudo apt update
sudo apt install zfsutils-linux
Check the target disks, we will use disk sdb
, sdc
and sdd
for the zfs pool.
lsblk
.....
/dev/sdb 8:0 0 10G 1 disk
/dev/sdc 8:0 0 10G 1 disk
/dev/sdd 8:0 0 10G 1 disk
.....
Create zfs pool
sudo zpool create $zfs_pool_name sdb
Use raidz
if you need to create a mirrored RAID-Z pool. (Need at least two disks to create such pool.)
sudo zpool create $zfs_pool_name raidz sdb sdc
Use raidz2
if you need to create a double-parity RAID-Z pool. (Need at least four disks to create such pool.)
sudo zpool create $zfs_pool_name raidz2 sdb sdc sdd sde
Check zpool status
zpool status
Create ZFS dataset
sudo zfs create $zfs_pool_name/$dataset_name
Check zfs dataset status
zfs list
# For more details
zfs list -r $zfs_pool_name/$dataset_name
zfs get all $zfs_pool_name/$dataset_name
Set up nfs server for k8s storage class to use
sudo apt-get install -y nfs-kernel-server
sudo systemctl enable --now nfs-kernel-server.service
Done! You have setup the zfs server successfully on Ubuntu Linux! Refer to [Appendix] Set up democratic-csi for TrueNAS or ZOL storage for how to setup k8s storage class for your k8s cluster.
https://openzfs.github.io/openzfs-docs/Getting Started/Ubuntu/index.html
https://docs.oracle.com/cd/E19253-01/819-5461/gaynr/index.html
https://docs.oracle.com/cd/E19120-01/open.solaris/817-2271/gcvjg/index.html