2017-02-22 17:29:49 +00:00
---
title: About the zfs_pool Resource
2018-02-16 00:28:15 +00:00
platform: linux
2017-02-22 17:29:49 +00:00
---
# zfs_pool
2019-04-26 18:24:29 +00:00
Use the `zfs_pool` Chef InSpec audit resource to test the ZFS pools on FreeBSD systems.
2017-02-22 17:29:49 +00:00
2017-10-03 21:35:10 +00:00
<br>
2018-08-09 12:34:49 +00:00
## Availability
### Installation
2019-04-26 18:24:29 +00:00
This resource is distributed along with Chef InSpec itself. You can use it automatically.
2018-08-09 12:34:49 +00:00
### Version
This resource first became available in v1.16.0 of InSpec.
2017-02-22 17:29:49 +00:00
## Syntax
A `zfs_pool` resource block declares the ZFS pool properties that should be tested:
describe zfs_pool('pool') do
it { should MATCHER 'value' }
end
where
* `('pool')` is the name of the ZFS pool (eg: `'tank'`)
* `MATCHER` is a valid matcher for this resource
* `'value'` is the value to be tested
2017-10-03 21:35:10 +00:00
<br>
2017-02-22 17:29:49 +00:00
## Examples
2019-04-26 18:24:29 +00:00
The following examples show how to use this Chef InSpec audit resource.
2017-02-22 17:29:49 +00:00
### Test a pool of 'tank'
describe zfs_pool('tank') do
its('autoexpand') { should eq 'off' }
its('failmode') { should eq 'continue' }
its('feature@lz4_compress') { should eq 'active' }
its('health') { should eq 'ONLINE' }
its('listsnapshots') { should eq 'off' }
its('readonly') { should eq 'off' }
end
2017-10-03 21:35:10 +00:00
<br>
## Matchers
2019-04-26 18:24:29 +00:00
This Chef InSpec audit resource dynamically exposes all ZFS pool properties available (see: `man zpool` for the list of supported properties). For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).