Forum Discussion

Varma_Chiluvuri's avatar
10 years ago

how tapes are moving to scratch pool automatically

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 au...
  • RamNagalla's avatar
    10 years ago

    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.

     

     

  • mph999's avatar
    10 years ago

    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.