Skip to content

sous-chefs/filesystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

329 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

filesystem cookbook

Cookbook Version CI State OpenCollective OpenCollective License

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.

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

Migration

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.

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

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Sponsor this project

Packages

 
 
 

Contributors