ADSM-L

Re: Antwort: Generating "dismount volume" commands

1999-11-05 08:23:55
Subject: Re: Antwort: Generating "dismount volume" commands
From: Rodrigo Gazzaneo <rodrigo_gazzaneo AT HOTMAIL DOT COM>
Date: Fri, 5 Nov 1999 08:23:55 EST
I also have a suggestion. Before moving drmedia,
update the stgpool mount retention to a low value
and volumes will be dismounted if not used.

A few minutes later you will be able to move the
drmedia. When the process is done, return the mount
retention to the original number.

Rodrigo



From: Russell Street <russells AT AUCKLAND.AC DOT NZ>
Reply-To: "ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Antwort: Generating "dismount volume" commands
Date: Fri, 5 Nov 1999 21:07:37 +1300

Alas there is no SQL table in ADSM with the mounted volumes listed.

I wrote a shell-script to look at the output of "query mount" and
dismounts them.

Works 99% of the time.  The 1% is the race condition between the query
and the dismounts.  There is a small gap the server can internally
issue a "dismount volume" or some process or session starts to use the
volume.  This just leads to an error message.  Conversely, a volume
can become idle in the gap and it will be missed.

Russell


#!/bin/sh
## =================================================================
## File: adsm-dismount-idle --- dismount all IDLE mounted tapes
##
## Author:  Russell Street <r.street AT auckland.ac DOT nz>
##          ITSS, University of Auckland
##
##
## =================================================================

admin_login=whatever
admin_pass=notlikely

VOLS=`/usr/bin/dsmadmc -id=$admin_login -pass=$admin_pass \
        query mount |
        nawk '$0 ~ /IDLE/ {print $4}'`

for i in ${VOLS} ; do
  /usr/bin/dsmadmc -id=$admin_login -pass=$admin_pass \
       dismount volume $i |
  egrep -v "^ADSTAR|^Command|^\(C\)|^Session|^
Server|^$|ANS8001I|ANS8002I"

done


## End of file: adsm-dismount-idle
## =================================================================


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
<Prev in Thread] Current Thread [Next in Thread>