cancel
Showing results for 
Search instead for 
Did you mean: 

I can`t deassign a tape

Melanie_Ploetz
Level 3
Hallo,

we use Netbackup 6.0/MP2

I can not use a tape.

Wenn I try to use "bpexpdate" I get this warning:
Are you SURE you want to delete N10007 y/n (n)? y
requested media id is in use, cannot process request

Wenn I try to use "vmquery -deassignbyid" I get this warning:
De-assign media by ID
invalid media ID (8)

Wenn I try to use "vmdelete" I get this warning:
the media is allocated for use (199)

How can I delete this tape?

Melanie
9 REPLIES 9

Melanie_Ploetz
Level 3
I find this post and it works:
http://forums.symantec.com/discussions/thread.jspa?messageID=4436988돼

zippy
Level 6
Melanie,

Dont despare, I have had this problem with nearly all versions of Netbackup.

I would re-inventory the robot from the GUI, update volume configuration then search for tape thats driving you nuts, click on it and try to delete it. IF an error comes back like a 92 then the tape has valid data on it.

Everytime I see this I mark it down on a sticky pad note thingee and go have some coffee and forget about it, then in a few days I try to expire it again and it woks.


JD

Stumpr2
Level 6
yep, I remember helping in that posting.Message was edited by:
Bob Stump

zippy
Level 6
Bob, this is James

Just wanted to let you know, I think I just gave you 40 or 50 points, I had just went through a bunch of old post and I felt like it was a time for some christmas giving, so I gave em all to you. You deserved them the most!

Merry and happy new year!

JD

Dennis_Strom
Level 6
To expire media

* bpexpdate -m -d 0 -force -host

To unfreeze media

* List the frozen media
o /usr/openv/netbackup/bin/goodies/available_media | grep -i FROZEN
* Unfreeze the media
o bpmedia -unfreeze -ev -h

http://support.veritas.com/docs/249632
DOCUMENTATION: How to troubleshoot frozen media on UNIX and Windows


Get the status and pool number of the tape
vmquery -m 000687
Deassign the tape
vmquery -deassignbyid
vmquery -deassignbyid 000687 4 0x0
Delete the tape
vmdelete -m 000687

to list backups of a certain retention level
# bpmedialist -mlist -U -rl 17

to change retention
bpimmedia -l -mediaid P00113 | egrep -v NULL
bpexpdate -recalculate -backupid iqhsaf5a_1158384195 -ret 4 -sched 0 -force

to list only images on a volume
bpimmedifor loop to change retention level
example
./change-retention P00054 Default-Application-Backup 4 2
./change-retention P00054 Full 4 0

cat ./change-retention
#!/bin/tcsh
#set-v
# $1 = media ID
# $2 = schedule name
# $3 = new retention level
# $4 = schedule type; legal values for sched: 0=full,1=differential incr,2=user,3=arch 4=cumulative incr

foreach RET (`/usr/openv/netbackup/bin/admincmd/bpimmedia -l -mediaid $1 | grep $2 | awk '{print $4
}'`)
/usr/openv/netbackup/bin/admincmd/bpexpdate -recalculate -backupid $RET -ret $3 -sched $4 -force
end
a -l -mediaid P00054 | egrep -v NULL | awk '{print $4}'

Stumpr2
Level 6
Dennis,
The proceedure to deassign changed in 6.0

DOCUMENTATION: The vmquery command will no longer deassign Veritas NetBackup (tm) media in version 6.0.
http://support.veritas.com/docs/278322

Dennis_Strom
Level 6
Cool thanks

h_m
Level 6
deassignbyid has been removed from NBU6.0 to stop people doing damage...

Stumpr2
Level 6
yup