cancel
Showing results for 
Search instead for 
Did you mean: 

how to find scratch tapes in library through commandline.

challa_007
Level 3
Certified
please help me about

How to find scratch tapes in library through command line.
1 ACCEPTED SOLUTION

Accepted Solutions

Andy_Welburn
Level 6
e.g.

/opt/openv/volmgr/bin/vmquery -rn 1 -w|awk  '{print $1, $9, $12}'|grep -i scratch

will produce output similar to:

300545   84   Scratch_Pool
300609   3   Scratch_Pool
300615   86   Scratch_Pool
300696   115   Scratch_Pool
300706   111   Scratch_Pool
300742   112   Scratch_Pool

where -rn 1 is robot number 1
$1 is media_id
$9 is slot number
$12 is volume pool name

View solution in original post

8 REPLIES 8

Andy_Welburn
Level 6
e.g.

/opt/openv/volmgr/bin/vmquery -rn 1 -w|awk  '{print $1, $9, $12}'|grep -i scratch

will produce output similar to:

300545   84   Scratch_Pool
300609   3   Scratch_Pool
300615   86   Scratch_Pool
300696   115   Scratch_Pool
300706   111   Scratch_Pool
300742   112   Scratch_Pool

where -rn 1 is robot number 1
$1 is media_id
$9 is slot number
$12 is volume pool name

Nicolai
Moderator
Moderator
Partner    VIP   

nbemmcmd -listmedia -poolname scratch | grep "Media ID:"

or if you are on windows:
 
nbemmcmd -listmedia -poolname scratch | findstr "Media ID:"


Will_Restore
Level 6
shows all volumes in given pool, not necessarily in the library

Ialahmad
Level 5
Partner

Hi
you can view all media ,  and this media arrange to groups by perform command
> available_media

faridux
Level 4
Certified
to know how many empty tapes are available
/usr/openv/netbackup/bin/goodies/available_media | grep AVAILABLE

Nicolai
Moderator
Moderator
Partner    VIP   

 nbemmcmd -listmedia -poolname scratch | grep -e "Media ID:" -e "Robot Number:"  |sed 'N;s/\n/ /;P;D;' | grep -v "-"

challa_007
Level 3
Certified
Thank you andy

Marianne
Level 6
Partner    VIP    Accredited Certified

challa_007



If Andy provided you with the answer, please mark his post as Solution.