Forge Home


ZFS HA NAS: a Highly-Avalaible NAS Appliance


1,721 latest version

5.0 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.6
  • 0.1.5
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Mar 18th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'maxadamo-zfs_nas', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add maxadamo-zfs_nas
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install maxadamo-zfs_nas --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



maxadamo/zfs_nas — version 0.2.0 Mar 18th 2020


Table of Contents

  1. Description
  2. Setup - The basics of getting started with zfs_nas
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module


This modules is the successor of the great Tiny NAS :-) In comparison with Tiny_NAS, it allows the normal load that you'd expect from a NAS.

The module sets up two servers sharing a filesystem through NFS (SMB is a roadmap feature). Development is at an early stage: there are oddities described in the Limitations section.


What zfs_nas affects

You have an option to let this module configure monit or you can configure monit yourself. I recommend to set a check interval between 15 and 60 seconds. Check interval in monit is called "cycle". We run our monit cheks every "1 cycles" (hence every 15 seconds). There are few modules available to configure monit.

Setup Requirements

  • sanoid package is not available. It can be compiled following the instructions: Install Sanoid

  • zfs repositories and gpg key are needed in CentOS (I haven't tested CentOS 8 yet) and I am using the package provided by zfs

Beginning with zfs_nas

Zfs_nas will will set cron jobs inside the file /etc/cron.d/zfs-auto-snapshot.

Furthermore, every 15 seconds, syncoid will run on the slave, to pull data from the master.

The zpool is created with the name zfs_nas. I don't see a reason to customize the name.


ZFS NAS server

In hiera you could have something as following:

  - ""
  - ""
  - ''
  - ''
  - '2001:.....:233'
  - '2001:.....:234'
vip_ip4: ''
vip_ip4_subnet: 22
vip_ip6: '2001:.....:235'
vip_ip6_subnet: 64
pool_disks: 'sdb'
    ensure: present
      - 'rw=@,sec=insecure,async,no_root_squash,no_subtree_check'
      - 'rw=@,sec=insecure,async,no_root_squash,no_subtree_check'
      - 'rw=@2001.....12c,sec=,insecure,async,no_root_squash,no_subtree_check'
      - 'rw=@2001.....12d,sec=insecure,async,no_root_squash,no_subtree_check'
ssh_pub_key: 'AAAAB3N.......zNTg/NjqJ'
ssh_id_rsa: >

And you call the module as following:

$ssh_id_rsa = Sensitive(lookup('ssh_id_rsa'))

class { 'zfs_nas':
  zfs_shares      => lookup('zfs_shares'),
  pool_disks      => lookup('pool_disks'),
  nodes_hostnames => lookup('nodes_hostnames'),
  nodes_ip4       => lookup('nodes_ip4'),
  nodes_ip6       => lookup('nodes_ip6'),
  vip_ip4         => lookup('vip_ip4'),
  vip_ip4_subnet  => lookup('vip_ip4_subnet'),
  vip_ip6         => lookup('vip_ip6'),
  vip_ip6_subnet  => lookup('vip_ip6_subnet'),
  ssh_id_rsa      => $ssh_id_rsa,
  ssh_pub_key     => lookup('ssh_pub_key');

ZFS Nas client

zfs_nas::client { '/test':
  ensure => present,
  server => '',   # this is the VIP of the cluster
  share  => '/zfs_nas/test_influx';


  • sanoid package must be compiled following the instructions available here: Install Sanoid
  • repositories are only needed for CentOS, and they are not handled properly (I didn't find a place to fetch the GPG key): this module will install the repository through the package provided by zfsonlinux
  • I started playing with Litmus and there is no unit test available yet (you trust what I'm doing)


Feel free to make pull requests and/or open issues on Zfs Nas GitHub Repository

Release Notes/Contributors/Etc.

The idea for this module originated from this post: How to perform incremental / continuous backups of zfs pool?