Artix Linux Forum

Artix Linux => Tutorials and HOWTOs => Topic started by: ####### on 10 October 2017, 23:22:45

Title: Set up a monthly btrfs scrub
Post by: ####### on 10 October 2017, 23:22:45
Place this in a suitably named script in  /etc/cron.monthly and make it executable with $ chmod a+x scriptname

#!/bin/sh
# Perform a btrfs scrub on the root filesystem

btrfs scrub start -c 2 -n 7 /


This is presuming you want to scrub / and it is BTRFS. It is advised to perform this monthly but you need to set it up yourself, otherwise it doesn't get done. Probably (to be cautious) if you are multi booting you should scrub only the BTRFS filesystems relating to that install in case of version discrepancies.