stacks/homelab/btrfs-scrub/run

18 lines
289 B
Plaintext
Raw Normal View History

2024-11-28 13:34:56 -07:00
#! /bin/sh
set -e
# Wait 7 days
sleep 7d
# Wait until it's after 10pm
while [ $(TZ=US/Mountain date +%H) -lt 22 ]; do
sleep 10m
done
# Limit scrub speed to 100m. Is this a good limit? I don't know!
btrfs scrub limit --limit 100m --all /sys
# Start the scrub!
btrfs scrub start /sys