zfs_core
Version information
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
- Puppet >= 6.0.0 < 7.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppetlabs-zfs_core', '1.0.1'
Learn more about managing modules with a PuppetfileDocumentation
zfs_core
Table of Contents
- Description
- Setup - The basics of getting started with zfs_core
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
The zfs_core module is used to manage both zfs and zpool resources. Though This module is only tested on Solaris machines, it should also work on any machine that has zfs or zpool resources.
Setup
Beginning with zfs_core
To create a zpool resource with the name tstpool
that uses the disk /ztstpool/dsk
:
zpool { 'tstpool':
ensure => present,
disk => '/ztstpool/dsk',
}
To create a zfs resource based on the pool created above:
zfs { 'tstpool/tstfs':
ensure => present,
}
Usage
For details on usage, please see the zfs puppet docs docs and the zpool puppet docs.
Reference
Please see REFERENCE.md for the reference documentation.
This module is documented using Puppet Strings.
For a quick primer on how Strings works, please see this blog post or the README.md for Puppet Strings.
To generate documentation locally, run
bundle install
bundle exec puppet strings generate ./lib/**/*.rb
This command will create a browsable \_index.html
file in the doc
directory. The references available here are all generated from YARD-style comments embedded in the code base. When any development happens on this module, the impacted documentation should also be updated.
Limitations
This module is only available on platforms that have both zfs and zpool available.
Development
Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
For more information, see our module contribution guide.
Reference
Resource types
zfs
: Manage zfs. Create destroy and set properties on zfs instances. Autorequires: If Puppet is managing the zpool at the root of this zfs inzpool
: Manage zpools. Create and delete zpools. The provider WILL NOT SYNC, only report differences. Supports vdevs with mirrors, raidz, logs and s
Resource types
zfs
Manage zfs. Create destroy and set properties on zfs instances.
Autorequires: If Puppet is managing the zpool at the root of this zfs instance, the zfs resource will autorequire it. If Puppet is managing any parent zfs instances, the zfs resource will autorequire them.
Examples
Using zfs.
zfs { 'tstpool':
ensure => present,
}
Properties
The following properties are available in the zfs
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
aclinherit
The aclinherit property. Valid values are discard
, noallow
, restricted
, passthrough
, passthrough-x
.
aclmode
The aclmode property. Valid values are discard
, groupmask
, passthrough
.
acltype
The acltype propery. Valid values are 'noacl' and 'posixacl'. Only supported on Linux.
atime
The atime property. Valid values are on
, off
.
canmount
The canmount property. Valid values are on
, off
, noauto
.
checksum
The checksum property. Valid values are on
, off
, fletcher2
, fletcher4
, sha256
.
compression
The compression property. Valid values are on
, off
, lzjb
, gzip
, gzip-[1-9]
, zle
.
copies
The copies property. Valid values are 1
, 2
, 3
.
dedup
The dedup property. Valid values are on
, off
.
devices
The devices property. Valid values are on
, off
.
exec
The exec property. Valid values are on
, off
.
logbias
The logbias property. Valid values are latency
, throughput
.
mountpoint
The mountpoint property. Valid values are <path>
, legacy
, none
.
nbmand
The nbmand property. Valid values are on
, off
.
primarycache
The primarycache property. Valid values are all
, none
, metadata
.
quota
The quota property. Valid values are <size>
, none
.
readonly
The readonly property. Valid values are on
, off
.
recordsize
The recordsize property. Valid values are powers of two between 512 and 128k.
refquota
The refquota property. Valid values are <size>
, none
.
refreservation
The refreservation property. Valid values are <size>
, none
.
reservation
The reservation property. Valid values are <size>
, none
.
secondarycache
The secondarycache property. Valid values are all
, none
, metadata
.
setuid
The setuid property. Valid values are on
, off
.
shareiscsi
The shareiscsi property. Valid values are on
, off
, type=<type>
.
sharenfs
The sharenfs property. Valid values are on
, off
, share(1M) options
sharesmb
The sharesmb property. Valid values are on
, off
, sharemgr(1M) options
snapdir
The snapdir property. Valid values are hidden
, visible
.
version
The version property. Valid values are 1
, 2
, 3
, 4
, current
.
volsize
The volsize property. Valid values are <size>
vscan
The vscan property. Valid values are on
, off
.
xattr
The xattr property. Valid values are on
, off
.
zoned
The zoned property. Valid values are on
, off
.
Parameters
The following parameters are available in the zfs
type.
name
namevar
The full name for this filesystem (including the zpool).
zpool
Manage zpools. Create and delete zpools. The provider WILL NOT SYNC, only report differences.
Supports vdevs with mirrors, raidz, logs and spares.
Examples
Using zpool.
zpool { 'tstpool':
ensure => present,
disk => '/ztstpool/dsk',
}
Properties
The following properties are available in the zpool
type.
ensure
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
disk
The disk(s) for this pool. Can be an array or a space separated string.
mirror
List of all the devices to mirror for this pool. Each mirror should be a space separated string:
mirror => [\"disk1 disk2\", \"disk3 disk4\"],
raidz
List of all the devices to raid for this pool. Should be an array of space separated strings:
raidz => [\"disk1 disk2\", \"disk3 disk4\"],
spare
Spare disk(s) for this pool.
log
Log disks for this pool. This type does not currently support mirroring of log disks.
Parameters
The following parameters are available in the zpool
type.
pool
namevar
The name for this pool.
raid_parity
Determines parity when using the raidz
parameter.
Types in this module release
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.0.1 - 2018-08-20
Added
- (PUP-9053) Enable localization
Changed
- Bump puppet req to at least puppet 6
- Install module on all hosts, not just hosts with default role
- Bump puppet version contraint to < 7
1.0.0 - 2018-05-21
Summary
This is the initial release of the extracted zfs/zpool module