To setup NFS shares is simple
- Create a ZFS share as required
- Set the 'sharenfs' property
Creating a ZFS share
To list all existing ZFS shares
- zfs list
To create a new 1000GB share called share1 in the pool 'zones'. Note that since this is a quota and not a physical size you can easily change it at any time.
- zfs create zones/share1
- zfs set quota=1000G zones/share1
To setup a NFS share for ESXi on the 10.25.1.0/24 network for share1 use:
This allows ESXi servers on 10.25.1.x to access the share.
- zfs set sharenfs="firstname.lastname@example.org/24,email@example.com/24" zones/share1
- zfs get sharenfs zones/share1 ( to verify value )
Previously we also created a 'storage0' NIC on VLAN 25, on 10.25.1.0/24.
Also set the following as required for each new volume
- zfs set primarycache=all
- zfs set secondarycache=all
- zfs set logbias=latency
For ISO or Templates not needing performance
(This keeps ISO's from filling up the ARC or L2ARC cache)
- zfs set primarycache=none
- zfs set secondarycahe=none
- zfs set logbias=throughput
Now from ESXi must mount the NFS share from SmartOS at zones/share1
The NFS properties are persistent across reboots and are stored in the zpool.