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.
We will try to create filesystems in two ways: through keys found in node data under 'filesystems' or by being called directly with the filesystem
default provider. See the example recipe.
You can also use your own key for a list of filesystems, see the example recipe for an example of this option.
Tools have been listed in the following attribute key : filesystem_tools. This allows for extending the support to other/new filesystems.
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 a filesystem, add a definition to fstab, mount the filesystem
- filesystem - Create a filesystem, add a definition to fstab, mount the filesystem
- filesystem_filebacked - Create a loopback filesystem
Hash of filesytems to setup - this is called filesystems because filesystem is already created/managed by ohai (i.e. no s on the end).
Each filesytem's key is the FS label
: This explains each key in a filesystems entry. The label must not exceed 12 characters.
We also let you use your own top-level key if you want - see the default recipe and example recipe.
Keyed filesystem creation:
{
"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"
},
"cluster_01": {
"fstype": "ocfs2",
"package": "ocfs2-tools",
"device": "/dev/mpath/ocfs01",
"mount": "/mnt/test"
},
"filebacked": {
"file": "/mnt/filesystem-on-a-filesystem.file",
"device": "/dev/loop7",
"mount": "/mnt/filesystem-on-a-filesystem",
"size": "20000"
}
}
}
- Alex Trull [email protected]
- Jesse Nelson [email protected] 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.