#329 background raid scrub every 1h

This commit is contained in:
rootzoll 2019-12-12 10:26:21 +01:00
parent b6d1a03823
commit 15af48f6f8

View File

@ -211,6 +211,28 @@ do
fi
fi
###############################
# RAID data check (BRTFS)
###############################
# see https://github.com/rootzoll/raspiblitz/issues/360#issuecomment-467698260
# check every hour
recheckRAID=$((($counter % 360)+1))
if [ ${recheckRAID} -eq 1 ]; then
# check if raid is active
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
if [ ${isRaid} -eq 1 ]; then
# will run in the background
echo "STARTING BTRFS RAID DATA CHECK ..."
sudo btrfs scrub start /mnt/hdd/
fi
fi
###############################
# LND AUTO-UNLOCK
###############################