2007/2/7, C R Ritson <[EMAIL PROTECTED]>:

>5. Re: amverifyrun problem
>    Posted by: "Guy Dallaire" [EMAIL PROTECTED]
>    Date: Wed Feb 7, 2007 5:37 am ((PST))
>
>2007/2/1, Guy Dallaire <[EMAIL PROTECTED]>:
>>
>> If I try to run:
>>
>> amverifyrun DailySet1
>>
>> I get:
>>
>> Tape changer is chg-zd-mtx...
>> 1 slot...
>> Verify summary to [EMAIL PROTECTED]
>> Defects file is /tmp/amanda/amverify.15474/defects
>> amverify DailySet1
>> Thu Feb  1 10:37:22 EST 2007
>>
>> Loading -1 slot...
>> ** Error loading slot -1
>> amtape: could not load slot <none>: Illegal slot: "-1"
>> Errors found:
>> amtape: could not load slot <none>: Illegal slot: "-1"
>>
>> What's wrong ?
>>
>> I'm running 2.4.5

Yes. I knew I had a patch for amverifyrun in 2.4.5 but it was not
obvious what it did. Here is the patch, with commentry to follow:-

*** /local/amanda/current/sbin/amverifyrun-     2005-08-15
14:12:43.000000000 +0100
--- /local/amanda/current/sbin/amverifyrun      2006-05-04
10:05:05.000000000 +0100
***************
*** 48,56 ****
  fi


! FIRST_SLOT=`grep "taper: slot" $AMLOG | fgrep 'exact label match
! new tape
! first labelstr match' | sed 1q | sed 's/://g' | awk '{print $3}'`
  if [ X"$FIRST_SLOT" = X"" ]; then
    FIRST_SLOT='-1'
  fi
--- 48,56 ----
  fi


! FIRST_SLOT=`grep "taper: slot" $AMLOG \
! | egrep 'exact label match|new tape|first labelstr match' \
! | sed 1q | sed 's/://g' | awk '{print $3}'`
  if [ X"$FIRST_SLOT" = X"" ]; then
    FIRST_SLOT='-1'
  fi
***************
*** 58,64 ****
  NBTAPES=`grep -c "taper: wrote label " $AMLOG`

  if [ X"$NBTAPES" != X"0" ]; then
!   $AMVERIFY $CONFIG $FIRST_SLOT $NBTAPES
  else
    echo "Nothing to verify"
  fi
--- 58,69 ----
  NBTAPES=`grep -c "taper: wrote label " $AMLOG`

  if [ X"$NBTAPES" != X"0" ]; then
!   if ln -s $AMLOG $LOGDIR/log ; then
!     $AMVERIFY $CONFIG $FIRST_SLOT $NBTAPES
!     if [ -L $LOGDIR/log ] ; then rm $LOGDIR/log ; fi
!   else
!     echo "amdump or amflush is already running, or you must run
amcleanup"
!   fi
  else
    echo "Nothing to verify"
  fi

Euhhhhh ? I'm trying to figure out what I have to change in the
amverifyrun script.... I'm not familiar with that kind of patching. Is this
some sort of patch script ???

Reply via email to