#!/bin/sh # Repeate with btrfs-balance if using RAID btrfs scrub start / # Scrub 1 disk at a time while btrfs scrub status / | grep running; do sleep 20 done btrfs scrub start /media