How To Install btrfsmaintenance on Fedora 36

In this tutorial we learn how to install btrfsmaintenance in Fedora 36. btrfsmaintenance is Scripts for btrfs maintenance tasks

Introduction

In this tutorial we learn how to install btrfsmaintenance on Fedora 36.

What is btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories. This is a set of scripts supplementing the btrfs filesystem and aims to automate a few maintenance tasks. This means the scrub, balance, trim or defragmentation. Each of the tasks can be turned on/off and configured independently. The default config values were selected to fit the default installation profile with btrfs on the root filesystem. Overall tuning of the default values should give a good balance between effects of the tasks and low impact of other work on the system. If this does not fit your needs, please adjust the settings.

We can use yum or dnf to install btrfsmaintenance on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install btrfsmaintenance.

Install btrfsmaintenance on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install btrfsmaintenance using dnf by running the following command:

sudo dnf -y install btrfsmaintenance

Install btrfsmaintenance on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install btrfsmaintenance using yum by running the following command:

sudo yum -y install btrfsmaintenance

How To Uninstall btrfsmaintenance on Fedora 36

To uninstall only the btrfsmaintenance package we can use the following command:

sudo dnf remove btrfsmaintenance

btrfsmaintenance Package Contents on Fedora 36

/etc/sysconfig/btrfsmaintenance
/usr/lib/systemd/system/btrfs-balance.service
/usr/lib/systemd/system/btrfs-balance.timer
/usr/lib/systemd/system/btrfs-defrag.service
/usr/lib/systemd/system/btrfs-defrag.timer
/usr/lib/systemd/system/btrfs-scrub.service
/usr/lib/systemd/system/btrfs-scrub.timer
/usr/lib/systemd/system/btrfs-trim.service
/usr/lib/systemd/system/btrfs-trim.timer
/usr/lib/systemd/system/btrfsmaintenance-refresh.path
/usr/lib/systemd/system/btrfsmaintenance-refresh.service
/usr/share/btrfsmaintenance
/usr/share/btrfsmaintenance/btrfs-balance.sh
/usr/share/btrfsmaintenance/btrfs-defrag.sh
/usr/share/btrfsmaintenance/btrfs-scrub.sh
/usr/share/btrfsmaintenance/btrfs-trim.sh
/usr/share/btrfsmaintenance/btrfsmaintenance-functions
/usr/share/btrfsmaintenance/btrfsmaintenance-refresh-cron.sh
/usr/share/doc/btrfsmaintenance
/usr/share/doc/btrfsmaintenance/README.md
/usr/share/licenses/btrfsmaintenance
/usr/share/licenses/btrfsmaintenance/COPYING

References

Summary

In this tutorial we learn how to install btrfsmaintenance on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).