EVERYTHING XIAOMI
Get listed

Btrfsmaintenance

Btrfsmaintenance is a set of scripts for administering Btrfs filesystems by automating scrub, balance, trim, and defragmentation.

Place
#2 of 20
Score
6.9
Btrfsmaintenance's website

What Btrfsmaintenance is

Btrfsmaintenance is a set of scripts for administering Btrfs filesystems by automating scrub, balance, trim, and defragmentation. Each task can be enabled, disabled, and configured separately. Scrub reads filesystem data and metadata to check checksums, which can help surface hardware problems or bit rot. If a redundant good copy is available, it can repair data automatically. Periodic jobs can use cron or systemd timers, though a system can have only one of those scheduling methods active. The project supports widely used Linux distributions, with installation guidance for Debian-based systems and manual installation described for others. A zypper plugin can defragment RPM database files after package installation on SUSE-based distributions. Settings are geared to a default setup with Btrfs on the root filesystem and can be adjusted in the sysconfig file. Scrub may generate heavy read activity, while balance can use significant read and write resources; task concurrency can be serialized to limit load or interactions. Btrfsmaintenance is free under GPL-2.0 for Linux and self-hosted use.

Good

  • Separate controls for scrub, balance, trim, and defragmentation
  • Scrub can repair data when a good redundant copy exists
  • Scheduling via cron or systemd timers
  • Free and licensed under GPL-2.0

Watch out

  • Only one scheduling method can be active at a time
  • Scrub can cause intense reads; balance can use substantial resources
  • Nested subvolumes, snapshots, and other mount points need separate defragmentation entries

Who it suits

It suits Linux administrators who want configurable scheduled maintenance for Btrfs filesystems. It may also suit SUSE-based users who want the zypper plugin to defragment RPM database files after installation.

Verdict

Btrfsmaintenance offers configurable, schedulable Btrfs maintenance scripts, including checksum checks and conditional repair. Account for its resource demands and the need to list certain nested paths separately for defragmentation.

Plans and prices

From Btrfsmaintenance's own pricing page, checked 4 Oct 2026.

All about pricing
PlanPriceWhat it gives you
BtrfsmaintenanceFreeGPL-2.0 · scripts for btrfs filesystem maintenance

The facts

Each one read from Btrfsmaintenance's own pages, with the date it was checked.

What it does

API and SDK
The repository documents shell scripts, systemd units, configuration files and a Python or shell zypper plugin; it does not document a network API or SDK.checked 19 Oct 2026
Arch availability
Arch packages btrfsmaintenance 0.5.2-3 for the any architecture in its Extra repository and lists btrfs-progs as its dependency.checked 19 Oct 2026
Balancing
Its balance task reclaims underused Btrfs chunks using usage filters and can help avoid allocation problems caused by fragmented chunk space.checked 19 Oct 2026
Concurrency control
The BTRFS_ALLOW_CONCURRENCY setting can serialize maintenance jobs to reduce resource contention and task interaction.checked 19 Oct 2026
Configuration
Configuration values are designed for a default installation with btrfs on the root filesystem and can be adjusted in the documented sysconfig file.checked 4 Oct 2026
Configuration paths
SUSE and Red Hat derivatives use /etc/sysconfig/btrfsmaintenance, while Debian derivatives use /etc/default/btrfsmaintenance.checked 19 Oct 2026
Defragmentation
Its defrag task processes configured directories, while a separate zypper plugin defragments RPM database files after package transactions.checked 19 Oct 2026
Defragmentation limit
Configured directory defragmentation does not descend into other mount points, nested subvolumes, or snapshots; those paths must be listed separately.checked 4 Oct 2026
Dependencies
Debian packages depend on btrfs-progs and use either systemd or cron for scheduling.checked 19 Oct 2026
Distribution support
The project says it supports widely used distributions, provides installation guidance for Debian based systems, and describes manual installation for other systems.checked 4 Oct 2026
Documentation depth
The project README covers task behavior, tuning, scheduling, installation, distribution paths and snapshot-retention considerations, and release 0.5.1 added a manual page.checked 19 Oct 2026
Fedora availability
Fedora lists btrfsmaintenance versions for Rawhide and Fedora 43 through 45, with maintainers ngompa and atim.checked 19 Oct 2026
Gentoo availability
Gentoo offers version 0.5.2 and provides a systemd USE flag that selects systemd services and timers instead of cron timers.checked 19 Oct 2026
Independent adoption
Botmonster Tech gives installation examples for Debian/Ubuntu and Fedora and shows configuration for the package's systemd timers.checked 19 Oct 2026
Independent task configuration
Scrub, balance, trim and defrag can each be enabled, disabled and configured independently through the project configuration.checked 19 Oct 2026
Installation
Debian-based systems can use dist-install.sh, while other distributions can use distribution packages or manually install the scripts and service files.checked 19 Oct 2026
Integrations
A zypper plugin can defragment RPM database files after package installation on SUSE based distributions.checked 4 Oct 2026
Intended audience
The project describes its goal as helping administer btrfs filesystems and says common scripts and configurations are preferred over distribution specific ones.checked 4 Oct 2026
Latest documented release
The changelog identifies version 0.5.2 dated 2024-07-04 and records fixes for task startup syntax and sequential RAID5/RAID6 scrubbing.checked 19 Oct 2026
Licence
The repository is published under GPL-2.0, and Fedora identifies it as GPL-2.0-or-later.checked 19 Oct 2026
License
The repository identifies the project as licensed under GPL-2.0.checked 4 Oct 2026
Limit: balance workload
The documentation says balance can have a large read/write impact, needs workspace and may fail with a no-space reason requiring manual inspection.checked 19 Oct 2026
Limit: defrag and snapshots
An Unraid community discussion cautions that broad defragmentation can break copy-on-write deduplication and should generally be targeted, especially when snapshots are used.checked 19 Oct 2026
Limit: older kernel quota performance
The Ubuntu manpage warns that before kernel 5.2, balancing with quota groups enabled could stall the filesystem for an extended period.checked 19 Oct 2026

Alternatives to Btrfsmaintenance

All alternatives
  1. 1

    Avidemux

    Free planOpen sourceWebLinuxmacOSWindows
    7.3Free plan
  2. 2Disk SpeedUp logo

    Disk SpeedUp

    Free planWindows
    6.6Free plan
  3. 3Autoruns logo

    Autoruns

    Free planWindows
    6.3Free plan
  4. 4

    DymaxIO

    Windows
    6.2From $69 a year
  5. 5

    Windows File Recovery

    Free planWindows
    6.2Free plan
  6. 6

    Auslogics Disk Defrag

    Free planWindows
    6.0From €26.25 a year