First, let’s install the packages on the server

apt install zfsutils-linux nfs-kernel-server

Since all actions take place on a virtual disk, there will be one disk.

Create a pool:

zpool create share -o ashift=12 -o autoexpand=on -o autoreplace=on -o cachefile=none /dev/sdb

Let’s tune it up a bit:

zfs set atime=off share
zfs set checksum=fletcher4 share
zfs set acltype=posixacl share

For exports we will divide them by categories (services)

zfs create share/cloudmail

Well, then we create the final volume with export

zfs create -o sharenfs="rw=@10.110.12.0/24,sync,no_subtree_check,no_root_squash,insecure,crossmnt" -o quota=1G share/cloudmail/test

You can check with two commands that everything worked

  1. Look in zfs
# zfs get sharenfs
NAME                  PROPERTY  VALUE                                                                      SOURCE
share                 sharenfs  off                                                                        default
share/cloudmail       sharenfs  off                                                                        default
share/cloudmail/test  sharenfs  rw=@10.110.12.0/24,sync,no_subtree_check,no_root_squash,insecure,crossmnt  local
  1. Look at exports
# showmount -e localhost
Export list for localhost:
/share/cloudmail/test 10.110.12.0/24