mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-23 22:47:03 +01:00
scrub BTRFS before shutdown
This commit is contained in:
parent
646ff56b37
commit
c154eddacc
1 changed files with 8 additions and 0 deletions
|
@ -40,7 +40,15 @@ sleep 10
|
|||
echo "stop ${network}d (2) - please wait .."
|
||||
sudo systemctl stop ${network}d 2>/dev/null
|
||||
sleep 3
|
||||
|
||||
# make sure drives are synced before shutdown
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
if [ ${isBTRFS} -eq 1 ] && [ ${isMounted} -eq 1 ]; then
|
||||
echo "STARTING BTRFS RAID DATA CHECK ..."
|
||||
sudo btrfs scrub start /mnt/hdd/
|
||||
fi
|
||||
sync
|
||||
|
||||
echo "starting shutdown ..."
|
||||
sudo shutdown ${shutdownParams}
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Reference in a new issue