cancel
Showing results for 
Search instead for 
Did you mean: 

how tapes are moving to scratch pool automatically

Varma_Chiluvuri
Level 5
Certified

I observe daily twice tapes are moving to scratch pool after expiring.

I want to know how this process is happening because sometimes I have media which are expired but I need to wait till they automaticlaly move to scratch pool.

2 ACCEPTED SOLUTIONS

Accepted Solutions

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

tapes will move to the scratch Volume pool based on the value set in.

"Previous Pool Name: "

you can see this value using the command 

nbemmcmd -listmedia -mediaid <mediaID>

if the Previous Pool Name: does not set to Scratch , tapes will not move to Scratch once they are expired... in those cases you need to move the tapes manually to Scratch once.. to get it alingned from next time.

generally this clean up happens twice in a day.. that is the reason you are seeing two times a day.

 

 

View solution in original post

mph999
Level 6
Employee Accredited

The image cleanup runs x2 a day, every 12 hours by default.

-. bpexpdate -deassignempty (Default : every 12 hours)
 : It delete any media which the value of vimage is 0.

This is part of the image cleanup, and sets the tape with an 'expired' flag.
 
 -. bptm -delete_all_expired (Default : every 10 mins)
: It delete any media with EXPIRED flag

This runs every 10 mins (can be seen in the bptm log) and actualy expires the media that is flagged as 'expired', and it when this part completes that the tapes actually move to scratch.

When a tape is assigned (in use) it will appear in bpmedialist -m <media id>, showing a number of images.

WHen the no. images on the tape reachs 0 (ie. the images are still there, but the catalog shows 0 as they have expired) then the media will still appear in bpmedialist output until it is expired.  It will show 0 valid images.

Once the media is expired, it will still show in bpmedialist output, but will show as EXPIRED, this is the 'expired' flag I referenced above.

Once it is 'deleted' from the media DB (bptm -delete_all_expired) it will not show in bpmedialist and at this time it will have moved back to scratch.

If you are waiting for tapes to move, and you do not have anymore spare tapes, it is an indication that you do not have enough tapes.  NBU should have enough tapes to meet your needs without having to worry about expiring them, or running commands manually to free up tapes.

View solution in original post

10 REPLIES 10

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

tapes will move to the scratch Volume pool based on the value set in.

"Previous Pool Name: "

you can see this value using the command 

nbemmcmd -listmedia -mediaid <mediaID>

if the Previous Pool Name: does not set to Scratch , tapes will not move to Scratch once they are expired... in those cases you need to move the tapes manually to Scratch once.. to get it alingned from next time.

generally this clean up happens twice in a day.. that is the reason you are seeing two times a day.

 

 

View solution in original post

Varma_Chiluvuri
Level 5
Certified

Where can I find the script which moves tapes to scratch pool.

Because if i want them to move now, what can i do ?

mph999
Level 6
Employee Accredited

The image cleanup runs x2 a day, every 12 hours by default.

-. bpexpdate -deassignempty (Default : every 12 hours)
 : It delete any media which the value of vimage is 0.

This is part of the image cleanup, and sets the tape with an 'expired' flag.
 
 -. bptm -delete_all_expired (Default : every 10 mins)
: It delete any media with EXPIRED flag

This runs every 10 mins (can be seen in the bptm log) and actualy expires the media that is flagged as 'expired', and it when this part completes that the tapes actually move to scratch.

When a tape is assigned (in use) it will appear in bpmedialist -m <media id>, showing a number of images.

WHen the no. images on the tape reachs 0 (ie. the images are still there, but the catalog shows 0 as they have expired) then the media will still appear in bpmedialist output until it is expired.  It will show 0 valid images.

Once the media is expired, it will still show in bpmedialist output, but will show as EXPIRED, this is the 'expired' flag I referenced above.

Once it is 'deleted' from the media DB (bptm -delete_all_expired) it will not show in bpmedialist and at this time it will have moved back to scratch.

If you are waiting for tapes to move, and you do not have anymore spare tapes, it is an indication that you do not have enough tapes.  NBU should have enough tapes to meet your needs without having to worry about expiring them, or running commands manually to free up tapes.

View solution in original post

mph999
Level 6
Employee Accredited

To move manually, you can run

bpexpdate -deassignempty followed by bptm -delete_all_expired (in /netbackup/bin dir).  bpexpdate is probably in .../netbackup/bin/admincmd dir

If this doesn't free up tapes, then I suspect you don;t have any tapes where the images have all expired.

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

excllent info from Martin..

if you are still seeing the tapes in normal volume pools  even after following the Martin suggestion. 

those tapes Previous Volume pool might not be the Scratch one..

so you can select those tapes manaully in GUI--> right click --> chage and select volume pool as Scratch to move them Manually .

only unassinged tapes can be moved  to Scratch..  if you are not able to move them to scratch.. those tapes might have valid images or waiting to get expired.. 

mph999
Level 6
Employee Accredited

Thanks Ram -  I should really add that that is how works from memory ...

Worth noting, that a tape is fully expired/ unassigned when it has no assign time.  Easiest way to see this is run bpmedialist -m <media id>  - if it reports the tape is not found in the media DB, then it is expired.

Varma_Chiluvuri
Level 5
Certified

@mph999

I have executed "bpexpdate -deassignempty" followed by "bptm -delete_all_expired" but it didn't work.

@Ram,

I tried to move the tape to scratch pool using GUI but it gave me below error

cannot change media pool of an assigned media(91)

Varma_Chiluvuri
Level 5
Certified

I found the below article and it worked.

https://support.symantec.com/en_US/article.TECH45860.html

 

 

# bpmedialist -m tape02
Server Host = nbu-media-grv-nb

 id     rl  images   allocated        last updated      density  kbytes restores
           vimages   expiration       last read         <------- STATUS ------->
           On Hold
--------------------------------------------------------------------------------
tape02   3      4   06/14/2015 06:55  06/14/2015 06:56  hcart3      147103     0
              MPX   07/15/2015 06:56        N/A         EXPIRED
           0

#
[root@master] /root
# bpexpdate -m tape02 -d 0
Media tape02 is due to expire at 07/15/2015 06:56:46
Are you sure that the data on this media is not critical to
your business, and you are sure you want to delete tape02 y/n (n)? y
[root@master] /root
# bpmedialist -m tape02
requested media id is not assigned to this host in the EMM database

After this the tape02 automatically moved to scratch pool

Varma_Chiluvuri
Level 5
Certified

I have a question, when I try to deassign the tape02, it is asking for another media also can you explain why it is asking for the media which I didnt request to deassign.

 

# bpexpdate -deassignempty -m tape02
Search for empty media that meet the following criteria:
        Media id: tape02

Continue? y/n (n)y
The following empty media will be deassigned:
        Media-id:tape08    Host:media-2
        Media-id:tape09    Host:media-4

Are you SURE you want to continue y/n (n)? n
No changes made.

mph999
Level 6
Employee Accredited

The reason this worked:

bpexpdate -m tape02 -d 0

Is because the tape still had unexpired images, as would heve been seen in bpmedialist -m <media id> as I explained above, if the number of valid images is >0, the tape is assigned.

As to your last question, when you run bpexpdate -deassignempty -m tape02 it found other 'empty' media, and so was just offering to expire these as well.  Normal behavior.

M