mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-25 07:07:46 +01:00
detect success on turning raid off
This commit is contained in:
parent
c154eddacc
commit
03840cba82
1 changed files with 9 additions and 2 deletions
|
@ -794,8 +794,15 @@ if [ "$1" = "raid" ] && [ "$2" = "off" ]; then
|
||||||
sudo btrfs balance start -mconvert=dup -dconvert=single /mnt/hdd 1>/dev/null
|
sudo btrfs balance start -mconvert=dup -dconvert=single /mnt/hdd 1>/dev/null
|
||||||
sudo btrfs device remove ${deviceToBeRemoved} /mnt/hdd 1>/dev/null
|
sudo btrfs device remove ${deviceToBeRemoved} /mnt/hdd 1>/dev/null
|
||||||
|
|
||||||
>&2 echo "# OK - RaspiBlitz data is not running in RAID1 anymore - you can remove ${raidUsbDev}"
|
isRaid=$(btrfs filesystem df /mnt/hdd 2>/dev/null | grep -c "Data, RAID1")
|
||||||
exit 0
|
if [ ${isRaid} -eq 0 ]; then
|
||||||
|
>&2 echo "# OK - RaspiBlitz data is not running in RAID1 anymore"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
>&2 echo "# FAIL - was not able to remove RAID device"
|
||||||
|
echo "error='fail'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue