cookbook 'zfsonlinux', '~> 1.0.0'
zfsonlinux (1) Versions 1.0.0 Follow0
Installs/Configures ZFS on Linux.
cookbook 'zfsonlinux', '~> 1.0.0', :supermarket
knife supermarket install zfsonlinux
knife supermarket download zfsonlinux
zfsonlinux Cookbook
Table of Contents
Overview
This module manages the installation and configuration of ZFS on Linux.
Requirements
- Chef 12.5+
-
yumCookbook. -
yum-epelCookbook.
Attributes
| Key | Type | Description | Default |
|---|---|---|---|
['zfsonlinux']['manage_repo'] |
Boolean |
Determines if Chef should manage the Yum repos for ZFS on Linux or not as well as the EPEL repo on DKMS installs. | true |
['zfsonlinux']['repo']['el']['type'] |
String |
Determines if dkms or kmod kernel modules should be used. If you are using the stock Red Hat kernel kmod is recommended. The default is set to dksm as this will work on any system by default. |
dkms |
['zfsonlinux']['kmod']['modprobe'] |
Boolean |
Determines if when using the kmod installation method if the kernel module should be loaded by Chef or not. |
true |
Usage
This cookbook can:
- Optionally sets up the ZFS on Linux (and EPEL if using the
dkmsstyle install) repo. - Installs dependencies is using the
dkmsstyle install. - Installs the ZFS package.
- Can manage zpools.
- Can manage datasets.
A minimal default install (managed repos using dkms):
include_recipe 'zfsonlinux::default'
Using the kmod style install:
node.default['zfsonlinux']['repo']['el']['type'] = 'kmod' include_recipe 'zfsonlinux::default'
zfsonlinux_zpool
To create a zpool:
zfsonlinux_zpool 'morpheus' do vdevs ['/dev/sdb', '/dev/sdc'] end
To destroy a zpool:
zfsonlinux_zpool 'morpheus' do action :destroy end
NOTE: This resource currently only supports striped zpools.
zfsonlinux_dataset
To create a dataset with default properties:
zfsonlinux_dataset 'morpheus/nebuchadnezzar'
NOTE: You should ensure the parent
zpoolexists before creating a dataset on it.
To create a dataset with non-default properties:
zfsonlinux_dataset 'morpheus/nebuchadnezzar' do properties mountpoint: '/ship' compress: 'lz4' end
To remove a dataset without children:
zfsonlinux_dataset 'morpheus/nebuchadnezzar' do action :destroy end
To remove a dataset with children:
zfsonlinux_dataset 'morpheus/nebuchadnezzar' do remove_children true action :destroy end
Contributing
If you would like to contribute to this cookbook please follow these steps;
- Fork the repository on Github.
- Create a named feature branch (like
add_component_x). - Write your change.
- Write tests for your change (if applicable).
- Write documentation for your change (if applicable).
- Run the tests, ensuring they all pass.
- Submit a Pull Request using GitHub.
License and Authors
License: BSD 2-Clause
Authors:
Dependent cookbooks
| yum >= 3.5.2 |
| yum-epel >= 0.7.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
2016-11-27 (v1.0.0)
Summary
Initial release.
Features
- Optionally set-up ZFS on Linux repos (EL 6 & 7 supported.)
- Install ZFS package (
dkms&kmodsupported). - Optionally enable the
zfskernel module. - Custom resources for:
- zpools (
zfsonlinux_zpool) - striped zpools only at this time. - datasets (
zfsonlinux_dataset)
- zpools (
Collaborator Number Metric
1.0.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC009: Resource attribute not recognised: zfsonlinux/recipes/default.rb:10
FC108: Resource should not define a property named 'name': zfsonlinux/resources/dataset.rb:1
FC108: Resource should not define a property named 'name': zfsonlinux/resources/zpool.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
zfsonlinux/files/default/gpg.key
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.0.0 failed this metric
FC009: Resource attribute not recognised: zfsonlinux/recipes/default.rb:10
FC108: Resource should not define a property named 'name': zfsonlinux/resources/dataset.rb:1
FC108: Resource should not define a property named 'name': zfsonlinux/resources/zpool.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
zfsonlinux/files/default/gpg.key
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
FC108: Resource should not define a property named 'name': zfsonlinux/resources/dataset.rb:1
FC108: Resource should not define a property named 'name': zfsonlinux/resources/zpool.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.0.0 failed this metric
Failure: Cookbook should not contain binaries. Found:
zfsonlinux/files/default/gpg.key
Testing File Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.0.0 failed this metric
1.0.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number