cookbook 'filesystem', '~> 5.0.0'
filesystem
(42) Versions
5.0.0
-
Follow20
Provides custom resources for creating and mounting filesystems
cookbook 'filesystem', '~> 5.0.0', :supermarket
knife supermarket install filesystem
knife supermarket download filesystem
filesystem cookbook
This cookbook exists to generically define and create block device filesystems with the minimum of inputs.
This cookbook supports four main types of block devices:
- normal
device- drives, SSDs, volumes presented by HBAs etc - device ID
uuid- mostly found on drives / known block IDs. - LVM Volume Groups
vg- found on systems using LVM. - file-backed
file- created dynamically and looped back.
Create filesystems by calling the filesystem custom resource directly, or by passing keyed data to filesystem_create_all_from_key.
See [migration.md](migration.md) for details about migrating from the removed recipe and attribute API.
Filesystem tool defaults are exposed through the filesystem_tools resource property. This allows extending support to other or new filesystems without cookbook attributes.
Network file systems, nfs and others, are somewhat supported. This cookbook will attempt to create a mount point, enable the filesystem by adding an /etc/fstab entry for the filesystem mount and will attempt to mount the filesystem. This cookbook does not attempt to modify the internal contents of network filesystems.
Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
Requirements
- lvm cookbook when creating logical volumes
- package #{fstype}progs to support your chosen fstype. We provide some defaults, too.
Resources
- filesystem_create_all_from_key - Create multiple filesystems from keyed data
- filesystem - Create a filesystem, add a definition to fstab, and mount the filesystem
- filesystem_filebacked - Create a loopback filesystem
Migration
Top-level recipes and attributes have been removed. See [migration.md](migration.md) for old include_recipe 'filesystem' and node['filesystems'] usage, and the new resource/property API.
Usage
Keyed filesystem creation:
filesystem_create_all_from_key 'filesystems' do filesystems( 'testfs1' => { 'device' => '/dev/sdb', 'mount' => '/db', 'fstype' => 'xfs', 'options' => 'noatime,nodev', 'mkfs_options' => '-d sunit=128,swidth=2048', }, 'applv1' => { 'mount' => '/logical1', 'fstype' => 'ext4', 'vg' => 'standardvg', 'size' => '20G', } ) end
Direct filesystem creation:
filesystem 'filebacked' do file '/mnt/filesystem-on-a-filesystem.file' device '/dev/loop7' mount '/mnt/filesystem-on-a-filesystem' size '20000' action [:create, :enable, :mount] end
Authors
- Alex Trull cookbooks.atrullmdsol@trull.org
- Jesse Nelson spheromak@gmail.com source of the original cookbook.
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
Changelog
All notable changes to this project will be documented in this file.
5.0.0 (2026-04-25)
⚠ BREAKING CHANGES
- migrate filesystem resources (#150)
Features
Bug Fixes
- ci: Update workflows to use release pipeline (#144) (fb6d155)
- resolve undefined local variable or method
labelerror (#135) (caeb48f)
4.2.4 (2025-10-15)
Bug Fixes
4.2.1 - 2025-03-20
- Fix: initialise
labellocal variable on creation of file system
4.2.0 - 2024-12-15
- Support use of symlinks for device paths
4.1.0 - 2024-12-09
- Add validation to the filesystem label property, limiting to a maximum length of 12 characters
4.0.14 - 2024-05-03
- Update tested platforms
4.0.8 - 2023-06-08
Standardise files with files in sous-chefs/repo-management
4.0.1 - 2022-10-28
- Fix document:
nomkfsoption is not infilesystemresource
4.0.0 - 2021-10-14
- Chef 17 compatibility
- Minimum chef version set to 15.3
3.0.5 - 2021-08-31
- Standardise files with files in sous-chefs/repo-management
3.0.4 (2021-06-01)
- Standardise files with files in sous-chefs/repo-management
3.0.3 (2020-11-09)
- resolved cookstyle error: resources/default.rb:118:35 convention:
Style/RedundantCondition - fix the check for an existing mountable filesystem before running mkfs again
3.0.2 (2020-09-16)
- resolved cookstyle error: libraries/fs.rb:14:5 convention:
Style/RedundantAssignment - resolved cookstyle error: libraries/fs.rb:15:1 convention:
Layout/EmptyLinesAroundMethodBody - resolved cookstyle error: libraries/fs.rb:15:1 convention:
Layout/TrailingWhitespace
3.0.1 (2020-08-07)
- Fix README spelling errors and formatting
3.0.0 (2020-07-30)
- Simplified the filesystem freeze action code
- Added tests for the freeze action
- Updated the versions of platforms to test against
- Add the device_defer attribute to the filesystem resource. If set to true and the backing device does not exist the default resource returns without processing or error.
- Convert the lwrp resources to custom resources
- Add dokken cookbook converges and tests to the github flow
2.0.2 (2020-06-18)
- Removed Dangerfile from rubocop.yml
- Deleted rubocop.yml
- Ran latest cookstyle to clean up minor style issues
2.0.1 - 2020-05-20
- resolved cookstyle error: providers/filebacked.rb:36:14 refactor:
ChefModernize/ShellOutHelper
2.0.0 - 2020-05-05
- Require Chef Infra Client 14+
- Remove unused long_description metadata
- Remove ChefSpec matchers that are autogenerated now
- resolved cookstyle error: resources/create_all_from_key.rb:25:1 refactor:
ChefRedundantCode/UnnecessaryNameProperty - resolved cookstyle error: resources/default.rb:25:1 refactor:
ChefRedundantCode/UnnecessaryNameProperty - resolved cookstyle error: resources/filebacked.rb:25:1 refactor:
ChefRedundantCode/UnnecessaryNameProperty - resolved cookstyle error: resources/filebacked.rb:26:1 convention:
Layout/EmptyLines
1.0.0 - 2018-03-14
- Fix idempotence of 'wait for device' block
- Remove possible double format of disks if force
- Do not perform test mount if ignore_existing and force
- Use truthy value of ignore_existing rather than nil?
- updated mount resource in providers/default.rb to notify directory resource immediately to fix mount permissions after mounting
- Fix linting errors
- Updated default provider to notify directory resource immediately upon mounting filesystem. (#37)
- Reorganise code to only format disks once
- Fix missing /etc/fstab file in centos7 image
- Remove xfsprogs-devel
0.12.0 - 2017-04-24
- removed xfs dependency, installing packages in default.rb
0.11.1 - 2017-03-20
- fixed issue with frozen being a ruby default function
[0.11.0] - 2017-03-13
- Added CHANGELOG.md
- Added CONTRIBUTING.md
- Removed Berksfile.lock
- Added CODE_OF_CONDUCT.md
- Added Delivery
- Added Travis
- Added Test-Kitchen, Kitchen-dokken
- updated Berksfile to supermarket
- updated lvm >= 1.1
- updated to sous-chefs
[0.10.6] - 2016-01-21
[0.10.2] - 2015-10-13
- dont wait for network devices they won't exist
- make fetches to fspackages not fail on unknown types
Added
Collaborator Number Metric
5.0.0 passed this metric
Contributing File Metric
5.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
Cookstyle Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 passed this metric
Testing File Metric
5.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
5.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
5.0.0 passed this metric
5.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
Cookstyle Metric
5.0.0 passed this metric
No Binaries Metric
5.0.0 passed this metric
Testing File Metric
5.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
5.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
5.0.0 passed this metric
5.0.0 passed this metric
Testing File Metric
5.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
5.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
5.0.0 failed this metric
5.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