Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frozen tapes 3

Status
Not open for further replies.

zingara50

IS-IT--Management
Mar 21, 2003
2
US
When I run a media report I've noticed quite a lot of tapes that are in a frozen state and I can find no description of why this is happening. Is anyone else experiencing this and is there a cure? Thank you in advance.

Zingara50
 
This may happen with dirty drives / old-used tapes or driver problems. When they're I/O errors writing to a media it could be placed in frozen mode.

So if you think that the media is good you should put it back in normal mode ("bpmedia -m media -unfreeze" command I think).
 
Most common reason is what sdeb is writing, but it can be other things as well.
We got a lot of tapes frozen when we upgraded our tapedrives from 9940A to 9940B. In this case it wasn't an error, but because 9940B drives could read the 9940A format but not write it. So every time we tried to append data to a tape written in 9940A format the tape got frozen so that NBU didn't try to do it again.
When the images on the tapes in 9940A format expired we just used the unfreeze command since the 9940B drives would just write in the new format at BOT.
 
I have found the following to be quick way to unfreeze our media tapes:

run bpmedialist to find out which tapes are frozen and where they are located (if you have more than one media server) switch to this location and run bpmedialist to aquire tape number if you did not write it down before.
run bpmedia -unfreeze -ev "tape number" without the quotation marks
 
The other common problem this can be caused by is if you rotate tapes used for catalogs.

Once Netbackup has allocated a tape for catalog backups there is specific header data written to the tape that flags it as such. A tape cannot be reused for standard backups until that tape has been unfrozen.

One thing that has been missed though is that if there is this type of data (catalog) or any other data on tape that Netbackup refuses to overwrite you will also have to physically "relabel" the tape to reuse it. Unfreezing the media simply changes the status of the media in the volume database and does nothing to the media itself. Next time the tape is mounted it will become "frozen" again.

Use the following command to relabel the tape. Realize that if you are using a library the tape must reside in the library as it will be mounted. Standalone drives will assume you are going to insert the media.

bplabel -m <media id> -d <tape density> -p <volume pool> -o

If anyone is interested I've got a couple scripts written for Windows that make this really easy for multiple tapes. Probably could be easily modified for use in Unix. Unfortunately I'm in a Win2k master server situation.

Hope this helps.

-Ty
 
Thank everyone, your information was valuable to the company I work with and the time you expended is very much appreciated.
 
I run a report every day to check for Frozen tapes...
I hope it helps ...

#!/bin/ksh
#
#
###############################################################################
#
# Name: tapecheck.ksh
# Purpose: This script checks all tapes and will LISTot any Frozen.
#
# Modified by: Steve Staves
# Date Created: April 2nd, 2003
# Date Modified: Jul 30th, 2003
#
###############################################################################
#
# Set up variables
TMPF1=d:/veritas/ScriptFiles/Check_Tapes_Frozen/tapelist.txt
TMPF2=d:/temp/tapelist1.txt
LIST=d:/veritas/backupresults/Frozen_Tapes.txt
HIST=//sherlock/LISTorts/Veritas/Frozen_Tapes/Frozen_Tapes.txt

###############################################################################
#
# Remove temp files

if [ -f $TMPF1 ];then
rm $TMPF1
fi

if [ -f $TMPF2 ];then
rm $TMPF2
fi

if [ -f $LIST ];then
rm $LIST
fi


echo &quot; FROZEN Tape LISTort for `date`&quot; > $LIST
echo &quot;========================================================================== &quot; >> $LIST
echo &quot;&quot; >> $LIST

cat $TMPF1 | grep &quot; &quot; | grep -v &quot;last&quot; > $TMPF2

cat $TMPF2 | while read line
do

Print=no
if [ &quot;$(echo $line | awk '{print $1}')&quot; = &quot;Server&quot; ]
then
#ServerName=$(echo $line | awk '{print $4}' | vis)
ServerName=$(echo $line | awk '{print $4}' )
fi

TapeNumber1=$(echo $line | awk '{print $1}') # Tape number, if valid

if [ &quot;$(echo $line | grep FROZEN 1>/dev/null 2>&1 ; echo $?)&quot; = &quot;0&quot; ]
then
if [ &quot;$(echo $line | grep SUSPENDED 1>/dev/null 2>&1 ; echo $?)&quot; = &quot;0&quot; ]
then
TapeState=&quot;Frozen Suspended&quot;
Print=yes
else
TapeState=&quot;Frozen&quot;
Print=yes
fi
else
if [ &quot;$(echo $line | grep SUSPENDED 1>/dev/null 2>&1 ; echo $?)&quot; = &quot;0&quot; ]
then
TapeState=&quot;Suspended&quot;
Print=yes
fi

fi

if [ &quot;${Print}&quot; = &quot;yes&quot; ]
then
echo &quot;Server name: ${ServerName}\tTape number: ${TapeNumber2}\tTape State: ${TapeState}&quot; >> ${LIST}
echo &quot;${ServerName} ${TapeNumber2} ${TapeState}&quot; >> ${HIST}

fi

TapeNumber2=${TapeNumber1}

done

exit
 
Phantom, I am trying to user your script but it blows up because it can't find the tapelist. I changed my paths to match my server but is the tapelist generated by another command or am I missing something? Thanks for the help.

noscriptgenius
 
My apologies - I cann this with a batch file and the first command in the batch file is:
bpmedialist -U -mlist > d:\veritas\ScriptFiles\Check_Tapes_Frozen\tapelist.txt[/red]
One other thing as well that I was crazy enough to leave in:
if [ -f $TMPF1 ];then
rm $TMPF1
fi

Remove this section. I had it commented out but I accidentally removed the # when I posted. With that in, the file that is created is removed before the script can run against it - Duhh

Hopefully this makes sense now :)
 
CaptDef,

i would like your bplabel script if possible ?

I have 1 tape i would like to unfreeze,but
also an easier way of seeing how much/many tapes i have left that are able to be written to before they fill
up and my backups fail.
I run the report for summary of tapes, but not the best report and has to be run manually.

thanks
 
CAPTDEF,

Do you still have those Veritas scripts used to unfreeze multiple tapes for a Windows environment? If so, would you please post them or email them to me.

Thanks,

Salty Walty
 
I have the unix version for unfreezing all of your tapes but not the windows version.
 
By far the easiest way to find Frozen tapes - available_media |grep FROZEN

Rich

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top