Freedom251 › System Information Software
Btrfsmaintenance

What Btrfsmaintenance is
Btrfsmaintenance is a free set of scripts for automating routine work on Btrfs filesystems. It covers scrub, balance, trim, and defragmentation, and each task can be enabled, disabled, and configured separately. Scrub reads filesystem data and metadata to check their checksums; it can reveal hardware trouble or bit rot and may repair damage when a good redundant copy is present. Periodic tasks can run through cron or systemd timers, though a system should use only one of these scheduling methods. 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 target a default setup with Btrfs on the root filesystem and can be changed in the sysconfig file. Scrub can cause heavy reads, and balance can create substantial read and write activity, so task concurrency can be serialized. The project is licensed under GPL-2.0.
Who it suits
Btrfsmaintenance suits administrators who want scheduled maintenance scripts for Btrfs filesystems on Linux or self-hosted systems. It is aimed at users comfortable configuring filesystem maintenance and its resource impact.
What it does well
- Automates scrub, balance, trim, and defragmentation.
- Tasks can be configured independently.
- Scrub can repair data when a good redundant copy exists.
- Supports cron or systemd timer scheduling.
- Free under GPL-2.0.
What to know first
- Only one scheduling method can be active per system.
- Scrub can cause intense reads.
- Balance can create significant read and write activity.
- Nested subvolumes and snapshots need separate defragmentation paths.
Limits
The free plan is for Btrfs filesystem maintenance scripts. A system can use cron or systemd timers for periodic tasks, but only one scheduling method can be active at a time. Directory defragmentation does not descend into other mount points, nested subvolumes, or snapshots; those paths must be listed separately.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Btrfsmaintenance | GPL-2.0 · scripts for btrfs filesystem maintenance | Free |
As github.com lists them, read 4 Oct 2026. The maker's own page has the final word.
Getting started
- Use a widely used Linux distribution; consult the project’s installation guidance for Debian-based systems or its manual installation guidance for others.
- Adjust settings in the documented sysconfig file as needed.
- Enable and configure the maintenance tasks you want to run.
- Schedule periodic tasks with cron or systemd timers, using one method on the system.
Btrfsmaintenance is a free collection of scripts for automating Btrfs filesystem care. It suits Linux administrators who want to manage recurring maintenance across systems without relying on distribution-specific scripts. Its chief advantage is task-by-task control; its main drawback is that scheduling and storage load require attention.
Overview
The scripts cover scrub, balance, trim, and defragmentation, with independent settings for each task. That makes Btrfsmaintenance a practical fit when an administrator wants to select and tune jobs rather than accept a fixed maintenance routine.
Scrub checks data and metadata against their checksums and may reveal hardware problems or bit rot. If redundant data or metadata includes a good copy, scrub can repair damaged data automatically. That is a meaningful safeguard, but it cannot provide that repair when no good redundant copy exists.
Key features
Scheduling and configuration
Periodic work can use cron or systemd timers, but only one method can be active on a system. The choice lets administrators fit maintenance into an existing scheduling approach; systems that depend on both methods cannot use them concurrently here. Defaults assume Btrfs on the root filesystem, and settings can be adjusted in the documented sysconfig file.
Workload controls
Scrub can drive intense reads, while balance can generate significant read and write activity. Tasks can be serialized to limit resource use or prevent jobs from interfering with one another. This control matters on storage where maintenance competes with other work, but it does not remove the underlying I/O demand.
Defragmentation and integrations
Configured directory defragmentation does not descend into other mount points, nested subvolumes, or snapshots. Administrators must list those paths separately, so a broad directory setting is not a complete substitute for checking filesystem layout. On SUSE-based distributions, a zypper plugin can defragment RPM database files after package installation.
Distribution support
The project supports widely used distributions, gives installation guidance for Debian-based systems, and describes manual installation for other systems. That makes it relevant beyond one distribution family, though administrators outside Debian-based systems should expect to follow manual installation guidance.
Pricing
Btrfsmaintenance costs nothing under GPL-2.0. Its free plan provides scripts for Btrfs filesystem maintenance, with no paid tier or free trial. There are no seat or quota limits in the plan terms provided; the practical requirement is a Linux environment with Btrfs and an administrator prepared to configure scheduling and workload.
Platforms
Btrfsmaintenance is for Linux and self-hosted use. The project describes common scripts and configurations as preferable to distribution-specific ones, while offering Debian-based installation guidance and manual installation instructions for other systems.
Who it's for
Choose it if you administer Btrfs filesystems and want configurable recurring scrub, balance, trim, or defragmentation jobs. It is less suitable if you need a graphical, cross-platform utility, or if you cannot accommodate potentially intensive storage activity during maintenance.
Pros and cons
- Pro: Independent controls for four maintenance tasks let administrators tailor recurring work to a filesystem.
- Pro: Scrub can check checksums and repair data when a good redundant copy exists.
- Pro: Task serialization can limit overlapping resource demands and interactions.
- Con: Only cron or systemd timers can be active, not both.
- Con: Scrub and balance can impose substantial read or write workloads.
- Con: Nested subvolumes, snapshots, and other mount points need separate defragmentation paths.
Alternatives
e4defrag is a better fit when the need is Linux defragmentation for ext4 rather than maintenance of Btrfs; it supports ext4 files with stated exclusions for swap files, files in lost+found, and files allocated in indirect blocks. For Windows defragmentation, Disk SpeedUp is a free Windows utility, while Puran Defrag supports Windows versions from XP through 11 and limits Directory Consolidation to NTFS partitions. WinContig is another free Windows option, with personal and commercial use on unlimited computers and no registration or payment. The Disk Defragmentation Software list may help compare further options.
Microsoft Quick Assist serves a different need: its free Windows app and macOS and web options are for Microsoft Support interactions. IObit Uninstaller is for Windows app removal, with a free version that includes batch uninstall, drag-and-drop uninstall, and automatic leftover cleanup. Auslogics Driver Updater targets Windows driver updates; its free plan handles one update at a time, while Pro is a one-year subscription for three PCs. Defragger is a Linux alternative, though its open-source plan is alpha software. The System Information Software list covers another category.
Verdict
Btrfsmaintenance is a strong choice for Linux administrators who want free, configurable maintenance for Btrfs and can manage job timing and I/O demand. Its independent task controls and conditional scrub repair are the reasons to choose it; look elsewhere if you need maintenance without workload planning or automatic coverage of nested filesystem paths.
Verdict
Btrfsmaintenance provides configurable scripts for several common Btrfs maintenance tasks. Its scheduling and workload limits matter: only one timer method is active, and scrub or balance can consume substantial storage resources.
Questions
How much does Btrfsmaintenance cost?
The listed plan is free.
Which maintenance tasks does it include?
It includes scrub, balance, trim, and defragmentation. Each task can be independently enabled, disabled, and configured.
How can periodic tasks be scheduled?
They can run through cron or systemd timers, with only one scheduling method active on a system.
Which Linux distributions are supported?
The project says it supports widely used distributions, gives installation guidance for Debian-based systems, and describes manual installation for others.
What does scrub do?
It checks filesystem data and metadata checksums and may reveal hardware problems or bit rot. When a good redundant copy is available, scrub can repair damaged data.
What license does it use?
The repository identifies Btrfsmaintenance as licensed under GPL-2.0.
Facts from Btrfsmaintenance's own pages
- 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. · github.com, 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. · archlinux.org, 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. · github.com, 19 Oct 2026
- Concurrency control
- The BTRFS_ALLOW_CONCURRENCY setting can serialize maintenance jobs to reduce resource contention and task interaction. · github.com, 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. · github.com, 4 Oct 2026
- Configuration paths
- SUSE and Red Hat derivatives use /etc/sysconfig/btrfsmaintenance, while Debian derivatives use /etc/default/btrfsmaintenance. · github.com, 19 Oct 2026
- Defragmentation
- Its defrag task processes configured directories, while a separate zypper plugin defragments RPM database files after package transactions. · github.com, 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. · github.com, 4 Oct 2026
- Dependencies
- Debian packages depend on btrfs-progs and use either systemd or cron for scheduling. · packages.debian.org, 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. · github.com, 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. · github.com, 19 Oct 2026
- Fedora availability
- Fedora lists btrfsmaintenance versions for Rawhide and Fedora 43 through 45, with maintainers ngompa and atim. · packages.fedoraproject.org, 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. · packages.gentoo.org, 19 Oct 2026
- Independent adoption
- Botmonster Tech gives installation examples for Debian/Ubuntu and Fedora and shows configuration for the package's systemd timers. · botmonster.com, 19 Oct 2026
- Independent task configuration
- Scrub, balance, trim and defrag can each be enabled, disabled and configured independently through the project configuration. · github.com, 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. · github.com, 19 Oct 2026
- Integrations
- A zypper plugin can defragment RPM database files after package installation on SUSE based distributions. · github.com, 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. · github.com, 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. · github.com, 19 Oct 2026
- Licence
- The repository is published under GPL-2.0, and Fedora identifies it as GPL-2.0-or-later. · github.com, 19 Oct 2026
- License
- The repository identifies the project as licensed under GPL-2.0. · github.com, 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. · manpages.ubuntu.com, 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. · forums.unraid.net, 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. · manpages.ubuntu.com, 19 Oct 2026
Where Btrfsmaintenance stands on Freedom251
- System Information Software#3 of 34
- Disk Defragmentation Software#2 of 20