-
-
Save Torstein-Eide/685837fc9eeb517599bb1b710e3818be to your computer and use it in GitHub Desktop.
Systemd timer for BTRFS Scrub. Usage: systemctl enable btrfs-scrub@pictures.timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/btrfs.d/btrfs-scrub-volum1 | |
mountpoint=/volum1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/btrfs-scrub@.service | |
[Unit] | |
Description=Scrub BTRFS filesystem (%i), check volume for errors | |
Documentation=man:btrfs-scrub | |
# After=fstrim.service | |
[Service] | |
Type=oneshot | |
EnvironmentFile=/etc/btrfs.d/btrfs-scrub-%i | |
ExecStart=/usr/sbin/btrfs scrub start -B $mountpoint | |
IOSchedulingClass=idle | |
CPUSchedulingPolicy=idle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/btrfs-scrub@.timer | |
[Unit] | |
Description=Trigger BTRFS scrub on filesystem (%i) | |
[Timer] | |
OnCalendar=monthly | |
Persistent=true | |
[Install] | |
WantedBy=timers.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment