cancel
Showing results for 
Search instead for 
Did you mean: 

Empty media slot in netbackup

Sid1987
Level 6
Certified

Hi Everyone,

 I am using below command to calculate empty slots in library. However I know this would count those slots as well which has media inside tape drives,

sudo /usr/openv/volmgr/bin/vmcheckxxx -rt tld -list -rn 0 | grep -c No

Is there any better way to find it out from netbackup, please don't suggest to find it from library, I know that would be most reliable.

1 ACCEPTED SOLUTION

Accepted Solutions

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

@Marianne

Apparently vmquery -bx does not request an update from the robot and still shows everything in original slots, although media has been already moved.

vmcheckxxx -rt tld -rn 0 scans the contents of the robot and indeed shows the tape in its original slot.

I would say this experiment highlights that robtest and vm* commands provide different output, where the output from robtest is real physical state of medium whereas NBU utilities show logical state. 

For the purposes of OP I'd stick to vmcheckxxx and disregard my suggestion to substract the number of busy tape drives if this command is used. However if robtest is used to calculate the number of free slots - the number of busy drives has to be substracted from the total amount of free slots

View solution in original post

10 REPLIES 10

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

vmcheckxxx is the reliable way - it runs inventory and gives a formatted output.

other option would be to run robtest on a media server that has physical access to the library and find out from its output http://www.veritas.com/docs/100016263

I don't see why I would prefer the latter to the former as they essentially do the same thing.

Even if NBU has/had a table in EMM with used/unused slots I'd not trust it for anything serious - it's better to run a robot inventory and get results from it

sclind
Moderator
Moderator
   VIP   

I use vmchange:

vmchange -res -robot_info -verbose -rn 0 -rt tld -rh `hostname`|grep "Number of Slots"
Number of Slots = 324 (57 empty)

Sid1987
Level 6
Certified

In addition to the vmcheckxxx command for counting "No", I will have to subract no of drives having tapes in them as those empty slots are temporarily empty. Do you all concur?

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

well, if you count free slots when some drives are busy then definitely yes, you need to substract the number of busy drives from the total number of free slots

Marianne
Level 6
Partner    VIP    Accredited Certified

IMHO, the slot number will NOT go empty/No when a tape is in the drive.
If this was the case, then Inventory with 'Empty MAP' would insert tapes in those drives. We know this is not the case.

Robtest and vmcheckxxx (and commands such as 'vmquery -bx -rn <#>') will keep the tape's slot number intact. This is how NBU and the robot knows which slot the tape must be returned to.

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

@Marianne Apologies but I have to respectfully disagree here.

Here is my setup with 2 tape libraries and hooking up robtest to one of them with 4 drives:

s d
drive 1 (addr 500) access = 1 Contains Cartridge = no
drive 2 (addr 501) access = 1 Contains Cartridge = no
drive 3 (addr 502) access = 1 Contains Cartridge = no
drive 4 (addr 503) access = 1 Contains Cartridge = no
READ_ELEMENT_STATUS complete

s s
slot 1 (addr 1000) contains Cartridge = yes
Barcode = G03001TA
slot 2 (addr 1001) contains Cartridge = yes
Barcode = G03002TA
slot 3 (addr 1002) contains Cartridge = yes
Barcode = G03003TA
slot 4 (addr 1003) contains Cartridge = yes
Barcode = G03004TA
slot 5 (addr 1004) contains Cartridge = yes
Barcode = G03005TA
slot 6 (addr 1005) contains Cartridge = yes
Barcode = G03006TA
slot 7 (addr 1006) contains Cartridge = yes
Barcode = G03007TA
slot 8 (addr 1007) contains Cartridge = yes
Barcode = G03008TA
slot 9 (addr 1008) contains Cartridge = yes
Barcode = G03009TA
slot 10 (addr 1009) contains Cartridge = yes
Barcode = G03010TA
slot 11 (addr 1010) contains Cartridge = yes
Source address = 500
Barcode = G03011TA

Now when I initate move from slot 11 to drive 1, I see drive is marked as having a tape in it, however the slot 11 is clearly marked as not containing any tape in it:

m s11 d1
Initiating MOVE_MEDIUM from address 1010 to 500
MOVE_MEDIUM complete
s d
drive 1 (addr 500) access = 1 Contains Cartridge = yes
Source address = 1010 (slot 11)
Barcode = G03011TA
drive 2 (addr 501) access = 1 Contains Cartridge = no
drive 3 (addr 502) access = 1 Contains Cartridge = no
drive 4 (addr 503) access = 1 Contains Cartridge = no
READ_ELEMENT_STATUS complete
s s
slot 1 (addr 1000) contains Cartridge = yes
Barcode = G03001TA
slot 2 (addr 1001) contains Cartridge = yes
Barcode = G03002TA
slot 3 (addr 1002) contains Cartridge = yes
Barcode = G03003TA
slot 4 (addr 1003) contains Cartridge = yes
Barcode = G03004TA
slot 5 (addr 1004) contains Cartridge = yes
Barcode = G03005TA
slot 6 (addr 1005) contains Cartridge = yes
Barcode = G03006TA
slot 7 (addr 1006) contains Cartridge = yes
Barcode = G03007TA
slot 8 (addr 1007) contains Cartridge = yes
Barcode = G03008TA
slot 9 (addr 1008) contains Cartridge = yes
Barcode = G03009TA
slot 10 (addr 1009) contains Cartridge = yes
Barcode = G03010TA
slot 11 (addr 1010) contains Cartridge = no

 

Marianne
Level 6
Partner    VIP    Accredited Certified

@Mouse

Thanks for this. I stand corrected.

Does vmcheckxxx and/or 'vmquery -bx' reflect the same?

Mouse
Moderator
Moderator
Partner    VIP    Accredited Certified

@Marianne

Apparently vmquery -bx does not request an update from the robot and still shows everything in original slots, although media has been already moved.

vmcheckxxx -rt tld -rn 0 scans the contents of the robot and indeed shows the tape in its original slot.

I would say this experiment highlights that robtest and vm* commands provide different output, where the output from robtest is real physical state of medium whereas NBU utilities show logical state. 

For the purposes of OP I'd stick to vmcheckxxx and disregard my suggestion to substract the number of busy tape drives if this command is used. However if robtest is used to calculate the number of free slots - the number of busy drives has to be substracted from the total amount of free slots

Marianne
Level 6
Partner    VIP    Accredited Certified

@Mouse wrote:

vmcheckxxx -rt tld -rn 0 scans the contents of the robot and indeed shows the tape in its original slot.

I would say this experiment highlights that robtest and vm* commands provide different output, where the output from robtest is real physical state of medium whereas NBU utilities show logical state. 

For the purposes of OP I'd stick to vmcheckxxx ......


I agree with your advice to use vmcheckxxx. 
Great having you around!

Sid1987
Level 6
Certified

@Mouse, Thanks for the clear explanation, I also checked vmcheckxx to see for a media which is in tape drive, It says Yes against the slot it came from. So we don't need to subtract media count in drive to find total empty slots. Thanks