cookbook 'drbd', '~> 4.0.0'
drbd
(26) Versions
4.0.0
-
Follow6
Provides resource-first DRBD installation and pair orchestration.
cookbook 'drbd', '~> 4.0.0', :supermarket
knife supermarket install drbd
knife supermarket download drbd
drbd Cookbook
Installs and configures the Distributed Replicated Block Device (DRBD) service for mirroring block devices between a pair of hosts. Right now it simply works in pairs, multiple hosts could be supported with a few small changes.
This cookbook now exposes a resource-first API for the core DRBD workflow:
-
drbd_installinstalls the DRBD packages -
drbd_pairrenders pair configuration and exposes initialization, promotion, formatting, and mounting as explicit actions
The legacy drbd::default and drbd::pair recipes remain as compatibility wrappers in this incremental modernization slice.
The drbd cookbook does not partition drives. It will format partitions given a filesystem type, but it does not explicitly depend on the xfs cookbook if you want that type of filesystem, but you can put it in your run list and set the node['drbd']['fs_type'] to 'xfs' or 'ext4' or whatever.
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
Platforms
- Debian
- Fedora
- openSUSE Leap
- Oracle Linux
- Red Hat Enterprise Linux
- AlmaLinux
- Ubuntu
Chef
- Chef 15.3+
Cookbooks
- yum-elrepo
Current x86_64 Kitchen verification in this migration branch covers AlmaLinux 9, Debian 12, and Ubuntu 24.04. On EL9 x86_64, the cookbook installs drbd9x-utils and kmod-drbd9x from ELRepo. RHEL support remains declared through the same ELRepo path, and ChefSpec covers that package-selection flow explicitly. EL9 aarch64 and Amazon Linux 2023 remain outside the verified matrix for this release line.
Recipes
drbd_install
Installs DRBD packages. On the RHEL path it bootstraps yum-elrepo by default. EL9 x86_64 installs drbd9x-utils and kmod-drbd9x; older EL releases continue using drbd-utils and kmod-drbd.
drbd_install 'default'
drbd_pair
Renders pair configuration and keeps the stateful replication steps explicit.
drbd_pair 'pair' do local_ip '192.0.2.10' remote_host 'node-b' remote_ip '192.0.2.11' disk '/dev/sdb1' mount_point '/srv/drbd' primary true action %i(configure initialize promote format mount) end
This replaces the old configured node flag with runtime checks against DRBD and the block device. Initial convergence may still be multi-step on real hardware, but the resource no longer relies on persisted node state to reach the mount step.
Legacy Recipe Attributes
The compatibility recipes still map the historical attributes into the new resources. The required attributes are:
-
node['drbd']['remote_host']- Remote host to pair with. -
node['drbd']['remote_ip']- Remote host to pair with. -
node['drbd']['local_ip']- Remote host to pair with. -
node['drbd']['disk']- Disk partition to mirror. -
node['drbd']['mount']- Mount point to mirror. -
node['drbd']['fs_type']- Disk format for the mirrored disk, defaults toext3. -
node['drbd']['master']- Whether this node is master between the pair, defaults tofalse.
The optional attributes are:
-
node['drbd']['packages']- Optional explicit package override for the compatibility recipes. When unset, the custom resource resolves platform-specific defaults.
Roles
There are a pair of example roles drbd-pair.rb and drbd-pair-master.rb with the cookbook source.
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.
Dependent cookbooks
| yum-elrepo >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
drbd Cookbook CHANGELOG
This file is used to list changes made in each version of the drbd cookbook.
4.0.0 (2026-04-22)
⚠ BREAKING CHANGES
- Migrate to custom resources (#50)
Features
Bug Fixes
3.0.16 (2025-10-15)
Bug Fixes
3.0.9 - 2023-06-08
Standardise files with files in sous-chefs/repo-management
3.0.4 - 2023-03-02
- Standardise files with files in sous-chefs/repo-management
3.0.3 - 2023-02-14
- Remove delivery folder
3.0.2 - 2021-08-31
- Standardise files with files in sous-chefs/repo-management
3.0.1 - 2021-06-01
- Standardise files with files in sous-chefs/repo-management
3.0.0 - 2021-03-17
- Updates default version to 9.0 on supported platforms
- Sous Chefs Adoption
- Cookstyle Fixes
2.0.1 (2017-09-01)
- Use a SPDX standard license string
- Disable FC075 where we actually need it
- Cleanup Travis testing and Kitchen config
2.0.0 (2017-02-18)
- Remove chef-solo compatibility check
- Add support for RHEL platforms by using yum-elrepo repository
- Use multi-package installs to speed up chef converges
1.0.0 (2016-09-15)
- Testing updates
- Require Chef 12.1
v0.10.0 (2015-10-20)
- Converted Chef::Shellout to Mixlib::Shellout to prevent deprecation warnings
- Changed Opscode -> Chef Software
- Added gitignore file
- Added chefignore file
- Added initial Test Kitchen config
- Added Chef standard rubocop config
- Added Travis CI testing
- Added Berksfile
- Added Gemfile with testing deps
- Updated testing and contributing docs
- Added maintainers.md and maintainers.toml files
- Added travis and cookbook version badges to the readme
- Added a Rakefile for simplified testing
- Added additional platforms to the metadata
- Added source_url and issues_url to the metadata
- Added basic convergence Chefspec
- Resolved Rubocop warnings
v0.9.0 (2014-06-11)
- Issue 3 - [CHEF-4979] add support for centos and multiple netwrok interfaces
v0.8.2
- [COOK-2957]: drbd cookbook has foodcritic failures
v0.8.0
- Initial release.
Collaborator Number Metric
4.0.0 passed this metric
Contributing File Metric
4.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
4.0.0 passed this metric
No Binaries Metric
4.0.0 passed this metric
Testing File Metric
4.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
4.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
4.0.0 passed this metric
4.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
4.0.0 passed this metric
No Binaries Metric
4.0.0 passed this metric
Testing File Metric
4.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
4.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
4.0.0 passed this metric
4.0.0 passed this metric
Testing File Metric
4.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
4.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
4.0.0 failed this metric
4.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