https://github.com/ximion/btrfsd
Tiny Btrfs maintenance daemon
https://github.com/ximion/btrfsd
btrfs daemon linux systemd-timer
Last synced: about 1 month ago
JSON representation
Tiny Btrfs maintenance daemon
- Host: GitHub
- URL: https://github.com/ximion/btrfsd
- Owner: ximion
- License: lgpl-2.1
- Created: 2023-02-20T19:25:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T10:14:21.000Z (12 months ago)
- Last Synced: 2025-04-20T17:40:32.398Z (about 2 months ago)
- Topics: btrfs, daemon, linux, systemd-timer
- Language: C
- Homepage:
- Size: 111 KB
- Stars: 22
- Watchers: 8
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
# Btrfsd - Tiny Btrfs maintenance daemon
[](https://github.com/ximion/btrfsd/actions/workflows/build-test.yml)Btrfsd is a lightweight daemon that takes care of all Btrfs filesystems on a Linux system.
It can:
* Check for detected errors and broadcast a warning if any were found,
or optionally send an email
* Perform scrub periodically if the system is not on battery
* Optionally schedule balancing operations as wellThe daemon is explicitly designed to be run on any system, from a small notebook to a large
storage server. Depending on the system, it should make the best possible decision for
running maintenance jobs, but may also be tweaked by the user.
If no Btrfs filesystems are found, the daemon will be completely inert.Btrfsd is called every hour via a systemd timer with the lowest CPU priority, so its impact
on system performance should be extremely low.
You can tweak the daemon's default settings by editing `/etc/btrfsd/settings.conf`,
check `man btrfsd(8)` for more documentation.# Installation
Btrfsd is packaged in a few Linux distributions for easy installation:
[](https://repology.org/project/btrfsd/versions)
# Building
Btrfsd can be built & installed from source using the Meson build system.
It requires GLib, JSON-GLib, libsystemd, libmount and btrfs-progs.On Debian-based systems, you can install all dependencies via:
```bash
sudo apt install btrfs-progs docbook-xsl libglib2.0-dev libjson-glib-dev libsystemd-dev meson xsltproc
```You can the build the daemon:
```bash
mkdir build && cd build
meson setup --buildtype=debugoptimized ..
ninja
ninja install
```