In a library sharing environment, I think this will flag volumes that
are associated with a different TSM server as orphaned. This is the
script I've been using:
tsm: TIBUR>q scr find_orphan_vols f=r
SELECT lv.volume_name from libvolumes lv -
LEFT OUTER JOIN volumes v ON lv.volume_name=v.volume_name -
LEFT OUTER JOIN volhistory vh ON lv.volume_name=vh.volume_name -
WHERE v.volume_name IS NULL -
AND vh.volume_name IS NULL -
AND lv.status<>'Scratch' -
AND lv.status<>'Cleaner'
-- Skylar Thompson ([email protected])
-- Genome Sciences Department, System Administrator
-- Foege Building S046, (206)-685-7354
-- University of Washington School of Medicine
On 10/ 8/12 05:38 AM, Ehresman,David E. wrote:
Here is a script that I got at a Share conference years ago that lists tapes
that are marked Private but are not being used:
tsm: ULTSM>q script q_lost_tapes f=l
Name Line Command
Number
---------- ------ ------------------------------------------------------------
Q_LOST_TA- 10 select volume_name as "Private Tapes NOT in Use" -
PES
20 from libvolumes -
30 where status='Private' -
40 and libvolumes.volume_name not in -
50 (select volume_name from volumes) -
60 and libvolumes.volume_name not in -
80 (select volume_name from volhistory -
90 where type in ('BACKUPFULL', -
100 'BACKUPINCR', -
110 'DBSNAPSHOT', -
120 'EXPORT'))
tsm: ULTSM>
I update such tapes to status Scratch.
David Ehresman
-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:[email protected]] On Behalf Of Lee,
Gary
Sent: Friday, October 05, 2012 2:36 PM
To: [email protected]
Subject: [ADSM-L] unaccounted for volumes
Tsm server 6.2.2 running on RHEL v6 with a 3494 library and 8 ts1120 drives.
Was doing some checking on tape inventory and usage for one of our tsm servers.
A
Select count(*) from libvolumes
Shows 298 volumes in the library.
Checking volhistory for database backup volumes shows 3 tapes in that capacity.
Check of pending volumes shows 1
And summing up all tape pool volumes gives 118.
A
Select count(*) from libvolumes where status='Private'
Shows 160
And
Select for scratch volumes gives 137.
The upshot is that I have around 40 volumes in the libvolumes table listed as
private, but not accounted for in the volumes or volhistory?
Audit library ields no errors.
Can I just check these out and re check them in as scratch?
What would account for this.
p.s.
I have the volhist file from the moment the server was placed online. The lost
volumes do not appear there anywhere.
Thanks for any help.
Gary Lee
Senior System Programmer
Ball State University
phone: 765-285-1310