From 7208e45be735ef3d1a41abb0951245ab3df78e1a Mon Sep 17 00:00:00 2001 From: rootzoll Date: Wed, 15 Jan 2020 11:17:12 +0100 Subject: [PATCH] mount degraded --- home.admin/config.scripts/blitz.datadrive.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/home.admin/config.scripts/blitz.datadrive.sh b/home.admin/config.scripts/blitz.datadrive.sh index c5a1c34a2..0a27e4d7b 100644 --- a/home.admin/config.scripts/blitz.datadrive.sh +++ b/home.admin/config.scripts/blitz.datadrive.sh @@ -119,18 +119,19 @@ if [ "$1" = "status" ]; then # temp mount data drive sudo mkdir -p /mnt/hdd - errorOutput=$(sudo mount /dev/${hdd}1 /mnt/hdd 2>&1 >/dev/null) - echo "errorOutput='${errorOutput}'" - + sudo mount -o degraded /dev/${hdd}1 /mnt/hdd + + # check any other error isTempMounted=$(df | grep /mnt/hdd | grep -c ${hdd}) if [ ${isTempMounted} -eq 0 ]; then - echo "hddError='data mount failed'" + echo "hddError='data mount failed'" + + # check for recoverable RaspiBlitz data (if config file exists) and raid else - # check for recoverable RaspiBlitz data (if config file exists) - hddRaspiData=$(sudo ls -l /mnt/hdd${subVolumeDir} | grep -c raspiblitz.conf) - isRaid=$(btrfs filesystem df /mnt/hdd 2>/dev/null | grep -c "Data, RAID1") - echo "hddRaspiData=${hddRaspiData}" - sudo umount /mnt/hdd + hddRaspiData=$(sudo ls -l /mnt/hdd${subVolumeDir} | grep -c raspiblitz.conf) + isRaid=$(btrfs filesystem df /mnt/hdd 2>/dev/null | grep -c "Data, RAID1") + echo "hddRaspiData=${hddRaspiData}" + sudo umount /mnt/hdd fi # temp storage data drive