Random Project

It works but not with all types of HDD

With seagate HDD it works perfect

but with WD HDD I had a problem because of this string:
grep “${i} ” $TEMPRAIDSTATUS | grep -v “row” | sed ‘s/ */ /g’| cut -d’ ‘ -f6

with the last “cut”
seagate output without “cut”:
a0e32s1 SEAGATE ST32000444SS 1863GiB a0d0 online

WD output without “cut”:
a0e32s0 ATA WDC WD2000FYYZ-0 1863GiB a0d0 online

So when cut works on seagate
CURRENTDISKSTATUS=online

on wd
CURRENTDISKSTATUS=a0d0

So for WD HDD you need to change this string to :
# Log list of degraded disks
CURRENTDISKSTATUS=$( grep “${i} ” $TEMPRAIDSTATUS | grep -v “row” | sed ‘s/ */ /g’| cut -d’ ‘ -f7 );