Networker

Re: [Networker] how to check which drives are free

2003-05-22 09:23:53
Subject: Re: [Networker] how to check which drives are free
From: Philippe Michel <Philippe.Michel AT THALES-IS DOT COM>
To: NETWORKER AT LISTMAIL.TEMPLE DOT EDU
Date: Thu, 22 May 2003 15:21:31 +0200
Mariusz Bogumi³ wrote:
> 
> My question is:
> 1) How to check in script which drives are free.  I mean - nobody is reading
> form or writnig to tapes which are inside them. They my be loaded.

Checking the NSR operation field will do what you ask. Something like :

nsradmin -s $SERVER -i - <<EOF
option hidden
show name ; NSR operation
print nsr device
EOF

But this not really what you need. An idle drive is not enough when it comes to 
modifying pools : as the "update failed" error below in your message shows, a 
tape mounted in it, even if it is not actively used, prevents the update.

You could try to eject whatever may be in the drive (nrjb -u -f ...) and check 
if that gives a "device ... is busy" error ; if not, the device is eligible for 
the update.

> 2) How to set in script that specific pool can use specific 2 device eg.
> /dev/rmt/0hbn /dev/rmt/1hbn
> I've tried:
> 
>     nsradmin>  print type:NSR pool; name: logi adk
> and then
>     nsradmin> update devices: /dev/rmt/0hbn; /dev/rmt/1hbn
>                    /dev/rmt/1hbn: ;
>                          devices: /dev/rmt/0hbn;
>     Update? y
>     update failed: Volume from pool `logi adk' is currently mounted on
> device `/dev/rmt/2hbn'
>     please unmount it before updating the pool resource.
>     nsradmin>
> 
> it works when as argument gove only one devices. Where is my mistake?
> 
> Regards
> 
> Mariusz Bogumil
> 
> --
> Note: To sign off this list, send a "signoff networker" command via email
> to listserv AT listmail.temple DOT edu or visit the list's Web site at
> http://listmail.temple.edu/archives/networker.html where you can
> also view and post messages to the list.
> =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

--
Note: To sign off this list, send a "signoff networker" command via email
to listserv AT listmail.temple DOT edu or visit the list's Web site at
http://listmail.temple.edu/archives/networker.html where you can
also view and post messages to the list.
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

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