Networker

Re: [Networker] File type device availability?

2010-07-29 11:18:16
Subject: Re: [Networker] File type device availability?
From: George Sinclair <George.Sinclair AT NOAA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 29 Jul 2010 11:14:30 -0400
Mathew Harvest wrote:
Hey George,

You can find out via an nsradmin query, the volume name will be blank if the 
device is unmounted.

----- the device is unmounted

nsradmin> show volume name
nsradmin> print type:nsr device;media type:adv_file;name:/global/datac/legato
                 volume name: ;

----- the device is mounted

nsradmin> print type:nsr device;media type:adv_file;name:/global/datac/legato
                 volume name: b2d.dc105ucsmsv01.c;


Apparently, nsrmm (wasn't even thinking about this command) will also provide this information:

nsrmm
nsrmm -C

In our case, either of these shows:

file disk fname1 mounted on /opt/nsr/ftype_devices/ftype1, write enabled
LTO Ultrium-4 tape vol1 mounted on rd=snode:/dev/nst3, write enabled
LTO Ultrium-4 tape vol2 mounted on rd=snode:/dev/nst2, write enabled
LTO Ultrium-4 tape vol3 mounted on rd=snode:/dev/nst0, write enabled
file disk fname2 mounted on /opt/nsr/ftype_devices/ftype3, write enabled
LTO Ultrium-4 tape vol4 mounted on rd=snode:/dev/nst1, write enabled
file disk fname3 mounted on /opt/nsr/ftype_devices/ftype4, write enabled
LTO Ultrium-4 tape vol5 mounted on rd=snode:/dev/nst5, write enabled
LTO Ultrium-4 tape vol6 mounted on rd=snode:/dev/nst4, write enabled
file disk fname3 mounted on /opt/nsr/ftype_devices/fname3, write enabled
(nothing) mounted on file disk /opt/nsr/ftype_devices/fname4
(nothing) mounted on file disk /opt/nsr/ftype_devices/fname5
(nothing) mounted on file disk /opt/nsr/ftype_devices/fname6
(nothing) mounted on file disk /opt/nsr/ftype_devices/fname7

So, could run something like:

nsrmm -s server -C | egrep '^file disk '

Or, maybe:

nsrmm -s server -C | egrep '^file disk [a-z|A-Z|_0-9]+ mounted on'

Using nsrmm might be easier to parse than nsradmin.


George


Mat.


-----Original Message-----
From: EMC NetWorker discussion [mailto:NETWORKER AT LISTSERV.TEMPLE DOT EDU] On 
Behalf Of George Sinclair
Sent: Thursday, 29 July 2010 4:19 AM
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Subject: [Networker] File type device availability?

How in a script can you determine if a file type device volume is mounted and available?

I notice that 'location' doesn't report these volumes from mminfo. Likewise, 'near' doesn't apply. How would the script know that it's mounted before it tries to access it?

George



--
George Sinclair
Voice: (301) 713-3284 x210
- The preceding message is personal and does not reflect any official or unofficial position of the United States Department of Commerce -
- Any opinions expressed in this message are NOT those of the US Govt. -

To sign off this list, send email to listserv AT listserv.temple DOT edu and type 
"signoff networker" in the body of the email. Please write to networker-request 
AT listserv.temple DOT edu if you have any problems with this list. You can access the 
archives at http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>