help in a script using raidctl

getStatusi86()
{
  #storing logical volume name
  volumelist=`cfgadm -val | grep "Logical Volume" | awk '{print substr($1,9,14)}'`
  controller=`echo $volumelist | awk '{print substr($1,2,1)}'`
  #errordisk=""
  volume1=`echo $volumelist | awk '{print $1}'`
  for volume in $volumelist
  do
    waitpe=0
    raidctl -l $volume > $fruTmpPath/${volume}.out 2>/dev/null

    while [ $? -ne 0 ]     #if raidctl doesnot executes successfully  keep on trying for 200 seconds and exit
    do
              if [ $waitpe -lt 40 ]
              then
                 echo "The disk verification is halted Retrying Please wait.........."
                 sleep 5
                 waitpe=`expr $waitpe + 1`
                 raidctl -l $volume > $fruTmpPath/${volume}.out 2>/dev/null

====================================================
I am getting the output " The disk verification is halted Retrying Please wait " because it fails for the command raidctl .

I used the command raidconfig which is in usr/bin instead of raidctlas suggested by one of my colleague but it ends with same error .

Have one more general query , it shows for volume in $volumelist in the script ( Is it correct or it has to be for volumelist in $volumelist )

Also , can anyone explain the usage of raidctl / raidconfig with examples

Bottom line is raidctl should not fail :wall:

Is this an AIX?
Difficult to say anything for we dont know the content of the variables...
I would start by finding out that first either by displaying or loading in separates files...
You redirected also STD ERR to /dev/null, it may be a good idea to send it to a file and see if there is a clue...