diff --git a/home.admin/config.scripts/blitz.datadrive.sh b/home.admin/config.scripts/blitz.datadrive.sh index 754811cf4..9fd2ca8ce 100644 --- a/home.admin/config.scripts/blitz.datadrive.sh +++ b/home.admin/config.scripts/blitz.datadrive.sh @@ -155,8 +155,8 @@ if [ "$1" = "status" ]; then fi else # output data drive - datadisk=$(df | grep "/mnt/hdd" | cut -d " " -f 1 | cut -d "/" -f 3 | sed 's/[0-9]*//g') - echo "datadisk='${datadisk}'" + hdd=$(df | grep "/mnt/hdd" | cut -d " " -f 1 | cut -d "/" -f 3 | sed 's/[0-9]*//g') + echo "datadisk='${hdd}'" fi echo @@ -181,7 +181,8 @@ if [ "$1" = "status" ]; then for disk in $(lsblk -o NAME,TYPE | grep "disk" | awk '$1=$1' | cut -d " " -f 1) do devMounted=$(lsblk -o MOUNTPOINT,NAME | grep "$disk" | grep -c "^/") - if [ ${devMounted} -eq 0 ]; then + # is raid candidate when not mounted and not the data drive cadidate (hdd/ssd) + if [ ${devMounted} -eq 0 ] && [ "${disk}" != "${hdd}" ]; then mountoption=$(lsblk -o NAME,SIZE,VENDOR | grep "^$disk" | awk '$1=$1') echo "raidCandidate[${drivecounter}]='${mountoption}'" drivecounter=$(($drivecounter +1))