Undetermined tapes in library

Kventin

ADSM.ORG Member
Joined
Oct 14, 2014
Messages
17
Reaction score
0
Points
0
I have tape library managed by TSM.

Currently, according to its data library console uploaded
119 tapes.

If I give the command to TSM
q libvol
That list will be issued from the
120 (??) Lines with numbered tapes in the library, the owner which is the TSM.
5 of them (from 120 (119)) have DbBackup status...

The problem is that if I ask the TSM database as she sees the tapes in the library in the assembled state:
"Select COUNT (VOLUME_NAME) from media where NOT state = "Mountable not in library""
- it give the number 76.

Question - what are the library has roughly 40 tapes "belonging» TSM?
 
"Select COUNT (VOLUME_NAME) from media where NOT state = "Mountable not in library""
This is the same as "q volume", so that's normal, it only gives you volumes assigned to storage pool. Scratch, backup db, exports, backupsets are not included in that count.

Q libvolume or "select count(*) from libvolumes" will give you TSM's inventory.

So, when you look at the physical library inventory, that's what really is in the library. Q LIBVOLUME gives you what TSM thinks is in the library. The two are normally the same.
When there is a discrepancy, you need to do two things:
- run an audit library to reconcile it: HELP AUDIT LIBRARY
- if the physical count is still higher than the TSM count, that means that the missing tapes are not checked in to TSM. If you know which tape it is and if it's scratch or private, you can checkin that tape manually. If you don't know which tape it is, then you can do two checkins, first one with STATUS=SCRATCH, second with STATUS=PRIVATE. In both cases, use SEARCH=YES so that it searches inside the library instead of the I/O slot.
 
This is the same as "q volume", so that's normal, it only gives you volumes assigned to storage pool. Scratch, backup db, exports, backupsets are not included in that count.

Q libvolume or "select count(*) from libvolumes" will give you TSM's inventory.

So, when you look at the physical library inventory, that's what really is in the library. Q LIBVOLUME gives you what TSM thinks is in the library. The two are normally the same.
When there is a discrepancy, you need to do two things:
- run an audit library to reconcile it: HELP AUDIT LIBRARY
- if the physical count is still higher than the TSM count, that means that the missing tapes are not checked in to TSM. If you know which tape it is and if it's scratch or private, you can checkin that tape manually. If you don't know which tape it is, then you can do two checkins, first one with STATUS=SCRATCH, second with STATUS=PRIVATE. In both cases, use SEARCH=YES so that it searches inside the library instead of the I/O slot.

Thank you for answer.
Yes, of course, the first thing I did -
"DISABLE SE
CANCEL SE
CANCEL PR
AUDIT LIBR IBM_TS3310 CHECKL=B
CHECKIN LIBV IBM_TS3310 CHECKL=B STAT=SCR SEARCH=Y WAITT=0
CHECKIN LIBV IBM_TS3310 CHECKL=B STAT=PRI SEARCH=Y WAITT=0"


But I don't understand why I have:
120 - by "q libvol"
120 - by "select count(*) from libvolumes"
And only 76 by "select COUNT (VOLUME_NAME) from media where NOT state='Mountable not in library'"...
 
And only 76 by "select COUNT (VOLUME_NAME) from media where NOT state='Mountable not in library'"...
Same as Q VOL, only gives you the list of volumes defined to storage pools. Scratch, backup db, exports, backupsets are not included in that count.

I bet that this "select count(*) from libvolumes where status='Scratch'" is equal to 120-76
 
And I bet that this query: select status,count(*) from libvolumes group by status

Gives you:
Code:
STATUS  Unnamed[2]
-----------------  ------------
Private                     76
Scratch                     44
 
tsm: TSMSRV>select COUNT (VOLUME_NAME) from media where NOT state='Mountable not in library'
Unnamed[1]
------------
75

tsm: TSMSRV>select status,count(*) from libvolumes group by status
STATUS Unnamed[2]
----------------- ------------
Private 118
Scratch 1

tsm: TSMSRV>select count(*) from libvolumes
Unnamed[1]
------------
119

tsm: TSMSRV>select count(*) from media where ACCESS='Unavailable'
Unnamed[1]
------------
1

in "q libvol" listing there are 5 rows marked as DbBackup
 
44 rows in the column "last use" have an empty field
 
44 rows in the column "last use" have an empty field
Bingo!

One of two things has happened. By mistake, someone checked in a series of scratch tape as private. Or there were I/O errors while using those scratch in the past and they were updated as private by TSM to prevent re-access.

You could update those libvolumes as scratch in this case.

Do you still have that 119 VS 120 discrepency as well?
 
120 was an exaggeration =)
LOL, no worries. I just wanted to be sure that it wasn't an actual difference because at the end of the day, all tapes should be accounted for.
 
Back
Top