Sha256: 93677f3889d4adca5a7a53f89e96247fdcd000c507c8a1fd67bc31f1540a6120

Contents?: true

Size: 1.37 KB

Versions: 20

Compression:

Stored size: 1.37 KB

Contents

---
title: About the zfs_pool Resource
platform: linux
---

# zfs_pool

Use the `zfs_pool` InSpec audit resource to test the ZFS pools on FreeBSD systems.

<br>

## Availability

### Installation

This resource is distributed along with InSpec itself. You can use it automatically.

### Version

This resource first became available in v1.16.0 of InSpec.

## 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

<br>

## Examples

The following examples show how to use this InSpec audit resource.

### 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

<br>

## Matchers

This 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/).

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
inspec-core-2.3.10 docs/resources/zfs_pool.md.erb
inspec-2.3.10 docs/resources/zfs_pool.md.erb
inspec-core-2.3.5 docs/resources/zfs_pool.md.erb
inspec-2.3.5 docs/resources/zfs_pool.md.erb
inspec-core-2.3.4 docs/resources/zfs_pool.md.erb
inspec-2.3.4 docs/resources/zfs_pool.md.erb
inspec-core-2.2.112 docs/resources/zfs_pool.md.erb
inspec-2.2.112 docs/resources/zfs_pool.md.erb
inspec-core-2.2.102 docs/resources/zfs_pool.md.erb
inspec-2.2.102 docs/resources/zfs_pool.md.erb
inspec-core-2.2.101 docs/resources/zfs_pool.md.erb
inspec-2.2.101 docs/resources/zfs_pool.md.erb
inspec-core-2.2.78 docs/resources/zfs_pool.md.erb
inspec-2.2.78 docs/resources/zfs_pool.md.erb
inspec-core-2.2.70 docs/resources/zfs_pool.md.erb
inspec-2.2.70 docs/resources/zfs_pool.md.erb
inspec-core-2.2.64 docs/resources/zfs_pool.md.erb
inspec-2.2.64 docs/resources/zfs_pool.md.erb
inspec-core-2.2.61 docs/resources/zfs_pool.md.erb
inspec-2.2.61 docs/resources/zfs_pool.md.erb