cancel
Showing results for 
Search instead for 
Did you mean: 

bpmedialist entries.

clueless
Level 4

current setup:
master and media server are the same.

 
Issue:
I need to freeze some tapes from the scratch pool.

When I run
bpmedia –freeze –m <media_id>
it says media id not present in the NB or volmgr database.

 
I suppose bpmedia looks up for the tape id in the output of bpmedialist
The scratch pool tape entries are absent in the output of bpmedialist also.

 
When I run the available_media script in goodies, the media is present there and I know for sure that the media is present cause I got it loaded.

 
1. What should I do if I need to freeze a tape from the scratch pool?
2. When is a tape added to the bpmedialist entry?


waiting for your replies, I mean solutions.
thanks.


24 REPLIES 24

Darren_Dunham
Level 6


@clueless wrote:
I need to freeze some tapes from the scratch pool.


You can't really do that directly.  Do you just want to keep them from being used in the future?  Move them to a volume pool that isn't in use.  That way nothing can grab them (since they won't be "Scratch").  Perhaps create a pool called "frozen", or "donotuse".

Scratch tapes are tracked by the volume manager, but are not yet handed to the NetBackup side of the house (where they would appear in bpmedialist).  Since NetBackup handles "freezing", it can't do that to these tapes.

--
Darren

Stumpr2
Level 6
you can't freeze an unassigned tape
 

clueless
Level 4

 Bob and Darren,

Thanks first of all, now I will tell the exact thing that I need to do, kindly suggest the best practice for the same.

 
We backup certain data on a daily basis,
Once the data is backed up, the tapes are sent offsite and the expiry for the tapes is 22days, after which the tapes are brought back, we scratch and re use them.

What happens at times is that after writing a few files, the tape freezes or throws a media write error.
Since the something was written on them, we have a policy to keep the tape around for 22days and discard when it comes around next, this is to make sure we can have at least those files restored which were successfully backed up on the tape.

When the tapes are ejected, the tape librarians are instructed to put an extra label on it saying
"Discard the tape when it comes around next time” 


But there is a chance that the label might get torn off, or by chance the librarian may end up inserting the tape, so I need to ensure that the tapes are never used in future.

What I need to do is make a script which will be run after loading the tapes.
this will check if the tapes are okay for usage.

 
How should I go about it?

Robert_Minser
Level 4

Clueless,

"When I run
bpmedia –freeze –m <media_id>
it says media id not present in the NB or volmgr database."

The format I use for the command is bpmedia -freeze -m <media_id> -p (Pool_ID) 0

 

Stumpr2
Level 6
why not simply use the write protect tab?
 
 

Andy_Welburn
Level 6
Correct me if I'm missing something here, but if the tapes have images on them as you say, then they will be assigned to a volume other than Scratch and can therefore be frozen (if indeed they aren't already because of repeated I/O errors or whatever).
If they are in Scratch, and so cannot be frozen as they are unassigned, then they have no images on them therefore what is the point of keeping them?

Stumpr2
Level 6
c'mon Andy. Your making me look bad Smiley Tongue
 
Yes Andy is correct.
Why are the tapes still in the scratch pool?
Are you identifying the scratch pool as the volume pool in the policy?
They should not be in scratch.
 
good catch Andy!
 

Andy_Welburn
Level 6
We're all allowed one (so I keep getting told anyway!) Smiley Wink


clueless
Level 4

 

Andy and bob thanks

Bob, how do I enable write protection using veritas commands or any other commands for that matter?
How do I check if a tape is write protected once it is loaded, it will too cumbersome to load each tape in the drive and check.

Andy, the reason why they are in the scratch pool is this.
I for instance use a tape ( say tape id:AAA001)  today and say 10 files were to be written on it, only 8of them were written after which the tape threw an error.

While backing up we set the expiry of the tapes to 22days, after that cycle they come back for usage.
Once the tapes are back, I load them, since these come after 22days they will be already expired hence when I load them the will go in the scratch pool,

Once the tapes are loaded, I need to check if any of these tapes threw an error the last time they were used.
So I need to put some checks, or an indicator say a flag or something.
From what I could think,
Freezing or suspending the tapes sounds a nice and easy approach.

 

When I am ejecting the tape AAA0001 it will be in some pool since backups were being written on it, so I can manually freeze it while ejecting,
What I need to know is if there is a better approach?

 

 my concern here is not freezin a tape from the scratch pool , but that a faulty tape gets recognised when it comes around next time?

 

 

Andy_Welburn
Level 6
I would be inclined to 'freeze' them as soon as you are aware they have had I/O errors & therefore still have valid images on them. Unless, of course, they fail enough times for them to 'freeze' automatically. Can't think of any other way around it, but ...


Regards, Andy.Smiley Happy

Stumpr2
Level 6


clueless wrote:

Bob, how do I enable write protection using veritas commands or any other commands for that matter?



slide the physical write-protect tab on the cartridge

Andy_Welburn
Level 6
Just had another thought (dangerous I know Smiley Very Happy)

Have you just started to have a lot of media I/O errors?
Maybe your tapes have past their best (ours started complaining after a few years hard labour), or maybe there is a tape drive issue (cleaning?)

Regards, Andy.

clueless
Level 4
bob said:
slide the physical write-protect tab on the cartridge

bob i said I need to do this using software, and not hardware,
and even if I slide the write protected tab on the cartridge, I can only check if the tape is write protected by loading it in the drive. I want to avoid doing that, for instance If I have 10 tapes, it will be too lame to put them in the drive ten times? there must be a simpler work around, if you know of any please let me know.


andy said:
I would be inclined to 'freeze' them as soon as you are aware they have had I/O errors & therefore still have valid images on them. Unless, of course, they fail enough times for them to 'freeze' automatically. Can't think of any other way around it, but ...

so it is freezing only then, and andy I also feel that the tapes have grown old, so I am gonna recommend getting a new set of tapes for one whole month, but the policy needs to be implemented for them also.

Stumpr2
Level 6
Here is what I would do. I wouldn't try anything fancy or labor intensive. I would do it the easy way and duplicate the existing couple of suspected good images that are on a suspected BAD tape unto another tape. I would not consider any other alternatives.
 
This will:
1. verify that I can actually read those couple of imges because it is a read/write operation for duplication
 
2. allow me to expire the old images on the questionable tape. 
 
3. allow me to toss the bad tape that is now empty or put it in the "cess" pool for future testing.
 
No concerns about keeping any suspected bad tapes for 22 days.
If it fails, then it's outta here.
 
 
....and that's my final answer. Smiley Very Happy
 
 

clueless
Level 4
gud one bob, it solves all my queries in this thread at least.

so I am gonna propose both the ideas to the client on monday, let see what they approve off,

thanks a lot to you and andy,


just for the kicks, I wanna start studying veritas netbackup properly, wat I do right now is in bits and pieces, should I pick a guide and act like a mule, and pass thru with it. or keep trying, and post on these forums as and when I get stuck somewhere,

when I wrote the two options, I realised the latter one is better, this way I will get to interact more with you guys and get to know ya'll too.


thanks a lot.

Stumpr2
Level 6
Read this first
Veritas NetBackup (tm) Enterprise Server / Server 6.0 Backup Planning and Performance Tuning Guide for UNIX, Windows, and Linux.
 
Then read this to see what the GUI is doing
VERITAS NetBackup (tm) 6.0 Commands for UNIX
 
Subscribe to this
 
y'all c'mon back now! ya'hear?
 

Darren_Dunham
Level 6


What happens at times is that after writing a few files, the tape freezes or throws a media write error.

Since the something was written on them, we have a policy to keep the tape around for 22days and discard when it comes around next, this is to make sure we can have at least those files restored which were successfully backed up on the tape.

When the tapes are ejected, the tape librarians are instructed to put an extra label on it saying
"Discard the tape when it comes around next time” 


But there is a chance that the label might get torn off, or by chance the librarian may end up inserting the tape, so I need to ensure that the tapes are never used in future.

What I need to do is make a script which will be run after loading the tapes.
this will check if the tapes are okay for usage.



You've already received lots of other good ideas, but as far as I can tell, there's no problem with your original work.

If the tape has errors, you 'freeze' it immediately.  Frozen tapes do not automatically expire, so even if the label fell off, you wouldn't have a scratch tape when it came back.  The tape would still be assigned to the original pool, and would still be frozen.

So you could discard the frozen tape at that point and would not be at risk of reuse.

--
Darren

clueless
Level 4
2 bob: thanks a lot mate

darren: thanks to you too, I will implement either of the two, and inform you guys
you have been of gr8 help.



clueless
Level 4
this approach won't work

When a tape throws an error, we do the following.

  1. load the tape(tape 1-faulty one)in a drive
  2. load another tape(tape 2)
  3. now we try to restore the data that was backed up on tape 1 to tape 2
  4. this confirms whether the data was recoverable, and if it was we have a tape ( tape 2) containing the same data, which can go with the box now and tape 1 can be discarded.
cuz when we have to restore something using Netbackup, it will ask for the original tape.