Forge Home

btrfsmaintenance

Configures BTRFS maintenance jobs using btrfsmaintenance package (Debian family)

14 downloads

14 latest version

1.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.0 (latest)
released Dec 3rd 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2021.7.x
  • Puppet >= 7.24 < 9.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'frankvandamme-btrfsmaintenance', '0.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add frankvandamme-btrfsmaintenance
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install frankvandamme-btrfsmaintenance --version 0.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

frankvandamme/btrfsmaintenance — version 0.1.0 Dec 3rd 2024

btrfsmaintenance

Welcome to your new module. A short overview of the generated parts can be found in the [PDK documentation][1].

The README template below provides a starting point with details about what information to include in your README.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with btrfsmaintenance
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Btrfsmaintenance configures BTRFS file system maintenance jobs based on the Debian package by the same name. It is possible to periodically run scrub, defrag, balance, and trim jobs and parametrize those.

Configuration ends up in a single central file /etc/default/btrfsmaintenance, and systemd timers are configured and updated based on that.

Setup

What btrfsmaintenance affects OPTIONAL

  • btrfsmaintenance package installation through apt
  • rewrites /etc/default/btrfsmaintenance file
  • systemd service btrfsmaintenance-refresh restart, which takes care of updating the timers

Setup Requirements OPTIONAL

Have Debian. RedHat does not even support BTRFS.

Beginning with btrfsmaintenance

include btrfsmaintenance

By default, this will not balance, defrag or scrub, but will trim any file system it can find on a monthly basis.

Usage

Use Hiera. To eg. balance /home every week:

btrfsmaintenance::balance_period: weekly
btrfsmaintenance::balance_mountpoints:
    - /home

Include usage examples for common use cases in the Usage section. Show your users how to use your module to solve problems, and be sure to include code examples. Include three to five examples of the most important or common tasks a user can accomplish with your module. Show users how to accomplish more complex tasks that involve different types, classes, and functions working in tandem.

Limitations

Only useful on systems that use btrfs file system, which for whatever reason need housekeeping.