moving place to add raid

This commit is contained in:
rootzoll 2019-12-14 12:20:51 +01:00
parent 6c0a6ba145
commit 98b9769158
2 changed files with 23 additions and 18 deletions

View File

@ -69,10 +69,8 @@ echo " OK"
echo
echo "# --> Check HDD/SSD for Blockchain ..."
echo "# hddGotBlockchain=${hddGotBlockchain}"
raidDevice=$(echo "${raidCandidate[0]}" | cut -d " " -f 1)
raidSizeGB=$(echo "${raidCandidate[0]}" | cut -d " " -f 2)
echo "# raidCandidates=${raidCandidates}"
echo "# raidDevice='${raidDevice}'"
echo "# raidSizeGB=${raidSizeGB}"
if [ ${hddGotBlockchain} -eq 0 ]; then
@ -80,6 +78,7 @@ if [ ${hddGotBlockchain} -eq 0 ]; then
format="ext4"
if [ ${raidCandidates} -eq 1 ]; then
echo
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "# EXPERIMENTAL FEATURE: BTRFS + RAID"
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@ -115,22 +114,6 @@ if [ ${hddGotBlockchain} -eq 0 ]; then
exit 1
fi
# adding RAID drive
if [ "${format}" = "btrfs" ] && [ ${raidCandidates} -eq 1 ]; then
echo
echo "# --> Adding Raid Drive ..."
echo "# raidDevice='${raidDevice}'"
echo "# raidSizeGB=${raidSizeGB}"
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh raid on ${raidDevice})
if [ ${#error} -gt 0 ]; then
echo "# FAIL blitz.datadrive.sh raid on --> ${error}"
echo "# Please report issue to the raspiblitz github."
exit 1
fi
fi
fi
echo "# OK"

View File

@ -44,6 +44,28 @@ if [ ${#error} -gt 0 ]; then
exit 1
fi
# adding RAID drive
echo "# isBTRFS=${isBTRFS}"
echo "# raidCandidates=${raidCandidates}"
if [ ${isBTRFS} -eq 1 ] && [ ${raidCandidates} -eq 1 ]; then
# example string: 'sdb 28 GB SanDisk'
raidDevice=$(echo "${raidCandidate[0]}" | cut -d " " -f 1)
raidSizeGB=$(echo "${raidCandidate[0]}" | cut -d " " -f 2)
echo
echo "# --> Adding Raid Drive ..."
echo "# raidDevice='${raidDevice}'"
echo "# raidSizeGB=${raidSizeGB}"
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh raid on ${raidDevice})
if [ ${#error} -gt 0 ]; then
echo "# FAIL blitz.datadrive.sh raid on --> ${error}"
echo "# Please report issue to the raspiblitz github."
exit 1
fi
fi
# init the RASPIBLITZ Config
echo
echo "# --> Init raspiblitz.conf ..."