cancel
Showing results for 
Search instead for 
Did you mean: 

How i can change volume pool of multiple media using one command?

Mehul_Pal
Level 5

How i can change volume pool of multiple media using one command?

1 ACCEPTED SOLUTION

Accepted Solutions

Marianne
Level 6
Partner    VIP    Accredited Certified

Barcode rules apply to NEW media only.

In Inventory update window click on Advanced option.

Open the Barcode tab.
Add a new barcode. Add the tag exactly as per my example below:

Barcode Tag : <DEFAULT>

Pool: Scratch

The above will ensure that all new tapes regardless of barcode tag goes to Scratch pool.
Any backup pool needing media will draw from Scratch.

Existing Unassigned/expired tapes will need to be moved to Scratch manually as a once-off exercise.

Spend about 30 seconds every day to do this in the GUI - sort by Assign Time, then pool name to have all expired tapes at the top of the screen.
Select all tapes not in Scratch pool, right-click, Change.
Select Scratch.

Once a tape has been moved to Scratch, it will return to Scratch automatically once all images have expired.

Hope this helps.

View solution in original post

12 REPLIES 12

RamNagalla
Moderator
Moderator
Partner    VIP    Certified

you need to write for loop to chage the Volume pool for mulitple tapes quicly

put the media ids in file /tmp/medialist
then run the below for loop

for i in `cat /tmp/medialist`; do /usr/openv/volmgr/bin/vmchange -p <new pool number> -m $i ; done

you can find the pool number using the /usr/openv/volmgr/bin/vmpool -list_all.

alternatnly you can simply select list of medias in GUI and right click--> change and select the desired volume pool.

NOTE:- you can only chage the volume pool of the media if the media is in unassinged state.

Mehul_Pal
Level 5
Thank you for the solution I m using Windows server without gui how's it possible

sdo
Moderator
Moderator
Partner    VIP    Certified

1) Query the list of volume pools:

> "C:\Program Files\Veritas\VolMgr\bin\vmpool.exe" -list_all

2) Identify the new pool number from the list above.

3) Create a file of specific media IDs:

> notepad C:\temp\media.lis

...and add the list of media.  Save the file.  Close Notepad.

4) Update media using:

> for /f "tokens=1" %a in ('type "C:\Temp\media.lis"') do ("C:\Program Files\Veritas\Volmgr\bin\vmchange.exe" -p <new-pool-mumber> -m %a )

Marianne
Level 6
Partner    VIP    Accredited Certified
Selecting multiple media-id's in the GUI is the easiest. Maybe a good time to take a step back and tell us why you need to change volume pool for multiple media-id's? Do you not have a Scratch pool? Or no Barcode Rules?

Mehul_Pal
Level 5

Hi all,

 

i know it would be a easy task using GUI

I want to understand if it's a easy task to do it using command ...so that just a click on that batch file would work

 

Thank you SDO for the loop are we using basic language in order to do it

 

could you please elaborate me how it works I mean you used syntax..

sdo
Moderator
Moderator
Partner    VIP    Certified

DOS tips should help you:

http://www.dostips.com/DtCodeBatchFiles.php

.

BTW that command that I posted above will not work in a 'batch' file.  You have to change the %a to %%a if you use a for loop in a batch file.  I've no idea why.  That's just the way MS wrote it.

mph999
Level 6
Employee Accredited

I knew there was a reason I prefer Unix scripting ...

Marianne
Level 6
Partner    VIP    Accredited Certified

And my previous post is totally ignored....

Maybe a good time to take a step back and tell us why you need to change volume pool for multiple media-id's?

Do you not have a Scratch pool?
Or no Barcode Rules?

Mehul_Pal
Level 5

I apologize marianne your post was not at all ignored

yes i have not created the scratch pool just have the defaults pool

and yes i have not created any barcode rule as well

Marianne
Level 6
Partner    VIP    Accredited Certified

So, why not allow us to help you to do this? (Scratch Pool and Barcode Rules).

Then you can move tapes in 'one go' using the GUI and let tapes in future go to the correct pools.... or to Scratch from where other pools will draw.

Mehul_Pal
Level 5
Hi I want to know about bar code rules so that tapes can automatically move to scratch pool

Marianne
Level 6
Partner    VIP    Accredited Certified

Barcode rules apply to NEW media only.

In Inventory update window click on Advanced option.

Open the Barcode tab.
Add a new barcode. Add the tag exactly as per my example below:

Barcode Tag : <DEFAULT>

Pool: Scratch

The above will ensure that all new tapes regardless of barcode tag goes to Scratch pool.
Any backup pool needing media will draw from Scratch.

Existing Unassigned/expired tapes will need to be moved to Scratch manually as a once-off exercise.

Spend about 30 seconds every day to do this in the GUI - sort by Assign Time, then pool name to have all expired tapes at the top of the screen.
Select all tapes not in Scratch pool, right-click, Change.
Select Scratch.

Once a tape has been moved to Scratch, it will return to Scratch automatically once all images have expired.

Hope this helps.