From 1e5256a7871d938383e720c82b3c36dd92f07f58 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Tue, 28 Mar 2023 11:11:29 -0300 Subject: check.sh: Add btrfs-scrub(8) and btrfs-check(8) to routine --- src/infrastructure/scripts/check.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/infrastructure/scripts/check.sh') diff --git a/src/infrastructure/scripts/check.sh b/src/infrastructure/scripts/check.sh index ae2abd5..5c63816 100755 --- a/src/infrastructure/scripts/check.sh +++ b/src/infrastructure/scripts/check.sh @@ -18,7 +18,7 @@ help() { Run system sanity checks, such as email reachability, alarms - reachability, etc. + reachability, filesystem checks, etc. Examples: @@ -77,3 +77,16 @@ uuid() { for alias in abuse admin postmaster hostmaster; do uuid | mail -s "\"$alias\" alias test from $(id -un)@$(hostname)" "$alias@$(hostname)" done + + +PARTITIONS=' +/dev/vda3 +/dev/vdb1 +/dev/vdc1 +' +set -x + +for part in $PARTITIONS; do + btrfs scrub start -B "$part" + btrfs check --force -p "$part" +done -- cgit v1.2.3