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 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.
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.
- lvm cookbook when creating logical volumes
- package #{fstype}progs to support your chosen fstype. We provide some defaults, too.
- 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
Top-level recipes and attributes have been removed. See migration.md for old include_recipe 'filesystem' and node['filesystems'] usage, and the new resource/property API.
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',
}
)
endDirect 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- Alex Trull cookbooks.atrullmdsol@trull.org
- Jesse Nelson spheromak@gmail.com source of the original cookbook.
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.