Btrfs 定期检查

/etc/systemd/system/btrfs_scrub.service

[Unit]
Description=Run btrfs scrub on filesystem

[Service]
Type=forking
ExecStart=btrfs scrub start -B -d -c 2 -n 4 /mnt/ORICO/
TimeoutSec=10000
[Unit]
Description=Weekly btrfs scrub

/etc/systemd/system/btrfs_scrub.timer

[Timer]
OnBootSec=15min
#OnCalendar=weekly
OnUnitActiveSec=1w 
Persistent=true

[Install]
WantedBy=timers.target

定期检查命令例

btrfs scrub start -B -d -c 2 -n 4 /
btrfs balance start -dusage=50 -dlimit=2 -musage=50 -mlimit=4 /
Show Comments