Skip to main content
Topic: Set up a monthly btrfs scrub (Read 1873 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Set up a monthly btrfs scrub

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.