I use the following script to check reclaimable space by storage pool.  The 
output lines are numbered, makes it easy to check a percentage and a line 
number to get a tape count.

#!/usr/bin/ksh
#
# This script checks reclaimable space in a tape storage pool
# The list is displayed with line numbers and is sorted by
# reclaimable space in descending order.


# Check that a parameter is passed
if [[ $# != 1 ]]
then
   echo Usage: cr \<storage_pool_name\>
   exit 4
fi

dsmadmc -id=<userid> -pass=<password> -displ=list "q vol stg=$1 f=d" |
grep Reclaimable | sort -n -r -k 4 > $1.usage
cat -n $1.usage | more
rm $1.usage

Regards,
Jim Schneider


-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L@VM.MARIST.EDU] On Behalf Of 
Michael Roesch
Sent: Tuesday, April 15, 2014 9:28 AM
To: ADSM-L@VM.MARIST.EDU
Subject: Re: [ADSM-L] reclaimable tapes in a stgpool

Hi,

I'm using this query to see all tapes and how much reclaimable space they have 
in descending order. As we have a small library, this is suitable for us.

SELECT
volume_name,devclass_name,stgpool_name,pct_reclaim,pct_utilized,status,access
FROM volumes WHERE devclass_name='LTO_DeviceClass' order by pct_reclaim desc

Regards,
Michael Roesch





On Tue, Apr 15, 2014 at 3:59 PM, Rhodes, Richard L. < 
rrho...@firstenergycorp.com> wrote:

> Is there a way to determine the number of tapes in a stgpool that are 
> eligible for reclamation?
>
> I tried the following sql on all our TSM instances:
>             select stgpool_name, \
>                    count(*) \
>               from volumes \
>              where     pct_reclaim \> 64  \
>                    and devclass_name like '%TAPE%' \
>              group by stgpool_name "
>
> It returned a list, but when I went and ran "reclaim stgpool  <name> 
> threshold=65"
> many of the pools returned that there were no volumes to be reclaimed.  
> I think I need more qualifiers on the select.
>
> We currently have reclamation running automatically with a reclaim pct 
> of 65% on the stgpool.  I'm trying to move to manually running 
> reclamation during a window.  I don't want to just issue reclaim 
> stgpool cmds all at once for all instances to prevent a tape drive 
> storm.  I want to start them gradually, with the stgpools with the 
> most tapes to be reclaimed starting first.
>
> Thanks
>
> Rick
>
>
>
>
>
>
> -----------------------------------------
> The information contained in this message is intended only for the 
> personal and confidential use of the recipient(s) named above. If the 
> reader of this message is not the intended recipient or an agent 
> responsible for delivering it to the intended recipient, you are 
> hereby notified that you have received this document in error and that 
> any review, dissemination, distribution, or copying of this message is 
> strictly prohibited. If you have received this communication in error, 
> please notify us immediately, and delete the original message.
>

**********************************************************************
Information contained in this e-mail message and in any attachments thereto is 
confidential. If you are not the intended recipient, please destroy this 
message, delete any copies held on your systems, notify the sender immediately, 
and refrain from using or disclosing all or any part of its content to any 
other person.

Reply via email to