Solved

Prevent reuse tape command line

  • 22 December 2021
  • 13 replies
  • 187 views

Badge +6

Hello,

Is there a script that prevents a tape from being reused? 

Only script i found was the mark tape full, but that doesn´t assure me that the tape won’t get used once the data in it expires.

I have around 12k tapes that i need to prevent reuse and doing it via GUI doens’t seem to be very workable.

Any ideas?

 

Kind regards,

Amaral

icon

Best answer by Mike Struening 11 January 2022, 22:13

View original

13 replies

Badge +14

Have you tried qcommand where you can add a list of bar codes and maxime the number of tapes at once?

https://documentation.commvault.com/11.24/expert/11371_qmedia_markfull.html

qmedia markfull -b <barcode(s)> [-af <argsfile>] [-tf <tokenfile>] [-tk <token>] [-h]

 

If those tapes have been used a while back, I do not think you would have problems with the statement below (2min rule) and so you could potentially just insert them back and start running the command to a list of tapes.

  • This option marks media full, 2 minutes after the completion of the backup/archive operation. If any jobs are initiated within the 2 minutes, they are allowed to write to the media. If the job was associated with the prior media, new media (such as a new tape) will be used for subsequent jobs. (Applies to all backup/archive types.)

https://documentation.commvault.com/11.24/expert/57749_advanced_backup_options_media.html

 

Badge +6

@dude but once the data is expired on that media, it goes back to the scratch pool and i want to avoid that.

Badge +14

What is the retention configuration you are using on the storage policy for that particular tape job? can you change that?

A bit confused as you want to mark the media full and do not want to write data to it anymore, yet there seems to be a retention period that expires.

Badge +6

What i need is to prevent reuse of assigned media and to make sure that no data is written on those tapes. I could do prevent reuse 1 by 1, but i have 12k tapes to do that...

Badge +14

I do not have a written script, I believe qcommand could help or perhaps selecting the media in question and marking as "Prevent Reuse” then moving it to tehe “Overwrite Protect Media Pool”

https://documentation.commvault.com/11.24/expert/11941_saving_aged_data.html

Overwrite Protect Media

https://documentation.commvault.com/11.24/expert/10414_media_by_groups.html#b10418_overwrite_protect_media

Media Recycling

https://documentation.commvault.com/11.24/expert/10462_media_recycling.html

 

Badge +6

So my only option is to go click  1 by 1 on the 12k tapes… ok thank you anyway

Badge +14

Or you can just select all CRTL + A, Right Click, ALl Tasks, Prevent Reuse. That will work too.

 

Badge +6

the barcodes are not sequential unfortunately..

Userlevel 7
Badge +23

@jmiamaral , late to the party (was on holiday), though I’d like to help.

Do you have a list of the barcodes in a text file (so you can use command line options to move them to the protected pool)?

I know we have some scripts to modify retention (so you could mass change jobs), so we just need to figure out what data you have (i.e. a text file of barcodes) to see what options we have.

Badge +6

@Mike Struening yes i have a list with the barcode.

Userlevel 7
Badge +23

Let me see if I can get you an answer.  Give me a bit; I’m sure I can find you something!

Userlevel 7
Badge +23

@jmiamaral , I spoke to the top developers who own these features, and there is currently no option to do this via command line.

I took the liberty of creating a CMR in your name (341770) and assigned it to your main CommCell.

Unfortunately, that means there’s no option (for now) other then what @dude suggested.

Badge +6

@Mike Struening Ok thank you.

Reply