Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrades.
Please accept our apologies in advance for any inconvenience this might cause.

How to use vmquery view size image in media

Created: 07 Dec 2012 • Updated: 14 Dec 2012 | 6 comments
This issue has been solved. See solution.

Hi Fella,

I wanna use vmquery command to view scratch pool.

I ran this command : vmquery -b -pn scratch_pool | grep 'TLD' | grep'HCART*'

I managed to get the ouput. Now, how would i list tapes in the scratch pool , which is expired or the size (in KB) equal to 0.

I may run grep '0' but i worry it will clash to other value equal to '0'.

The reason why i want to sort like this because I want to re-label all those scratch tapes which are expired.

Masterserver OS: AIX 6.1

NBU version: 7.5

 

Kindly assist!

Comments 6 CommentsJump to latest comment

Marianne's picture

Tapes in scratch pool ARE expired - image size value will be 0.

vmquery shows hardware info only, not size on tape.

You can maybe use vmquery -bx and check that Assign Time field is blank/empty/00.

To get size/image info, use nbemmcmd command (cannot be used in the same way as vmquery)

nbemmcmd -listmedia -mediaid <media-id>

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

Yasuhisa Ishikawa's picture

All volumes in scratch pool must have no data.
When assigning volumes from scrach pool, volumes moves from scratch pool to desired volume pool. And, when volumes come backup to scratch pool, data on these volumes must be expired.

If you want to check it anyway, try this:

vmquery -l -pn scratch_pool | awk '$3=="HCART[1-3]*"&&$7=="TLD"&&$20!~/^0*\/0*\/0*$/{print $1}'

Authorized Symantec Consultant(ASC) Data Protection in Tokyo, Japan

Marianne's picture

Try vmquery -a -bx

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

SOLUTION
righthanded's picture

thanks! I think it will help me. I have to apply and do some testing. Then will sort the media accordingly.

Thanks!

 

Jim-90's picture

I can sympathise with this one - I needed the same thing a while back and gave up. In the end I used

nbemmcmd -listmedia -poolname SCRATCHIES 

instead.

Why would you want to do this?  In VTL that has a dedupe back end you can create more carts then you have capacity for i.e.  the logical capacity of all carts always exceeds the real disk capacity, if you are not doing this then you ain't running the dedupe VTL effectively. 

Some dedupe VTLs are dumb and the scratch pool is treated as any other pool.  The VTL doesn't know that the data can be eliminated.   The best way to free this up this unnecessary usage of VTL disk to relabel the tapes.

In the end gave up I set up a cron job to relabel the entire SCRATCH pool.