1. Use vmquery -m media_id. This will give you the info necessary in the next step.
2. Do a vmquery -deassignbyid media_id pool_number status. This will now deassign the tape and enable you to reuse it after it has been expired.
3. Use bpexpdate -m media_id -d 0 -force. This will now expire the tape.
You will then need to move the media into the SCRATCH pool so that it can be reused by any NBU class. Prior to moving the media, make sure you use the refresh icon in the GUI
You are correct about expiring a tape. However, the tape,even though it is expired, will still be assigned and therefore cannot be moved to the scratch pool.
BSWIP has it right
1. Use vmquery -m media_id. This will give you the info necessary in the next step.
2. Do a vmquery -deassignbyid media_id pool_number status. This will now deassign the tape and enable you to reuse it after it has been expired.
3. Use bpexpdate -m media_id -d 0 -force. This will now expire the tape.
But - You may need to add a step:
2a. bpmedialist -m <TapeNumber > -h <MediaServer > To tell you if the tape is Frozen etc.
2b. bpmedia -unfreeze -m <TapeNumber> -h <MediaServer> if it is
These only need to be done if the deassign fails.
Another thing though on step 3 - Make sure it is ...
bpexpdate -m media_id -d 0 -host <mediaserver> -force
You need the -host otherwise the tape will not get expired and you will have database inconsistencies.
Not to belabor the point, but bonsky just asked how to expire a tape which does not require anything but the bpexpdate command. This of course would leave it in the same pool as it had been, which in my case is what I desire. I'm not clear on what BSWIP means by "will still be assigned and therefore cannot be moved to the scratch pool." Perhaps our operations are handled differently than at other locations, but we don't have a need for a scratch pool per se. If I want to reassign a tape from one pool to another, I just highlight the tape(s) in Media and Device Management, press the right mouse button, select Change, and select New Pool and enter the pool name that I want to move the tapes to. Or alternately use Actions, Change.
I will say that additional useful information such as the references to vmquery provide increased knowledge of NetBackup and make us all better managers of the software, so don't get me wrong. I just prefer to use as few steps as possible to accomplish my goal. My point is that I've never had to use the vmquery command to expire a tape. If someone would like to point out the advantage (or need) of using vmquery, then I and others would hopefully gain from that information.
Every tape has three main databases - The volume database, images database and the media database. Two reside on the master and the other on the media server.
bpexpdate will delete the tape from the media servers' database but not on the master so you get database inconsistencies. Believe me - I know all about that as we have over 2000 errors in our database as we have had it reviewed by Veritas.
It needs, no, HAS TO BE expired from both which is why you use bpexpdate and vmquery -deassign together.
oki, I really am learning a lot from all of you.. hehe... nice to hear that you all have answered my inquiry. I tried to do the bpexpdate only, but let me try to do the vmquery as well and lets see..I believe you guys have points there..
THANKS a LOT!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.