Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automating Unmount command 1

Status
Not open for further replies.

Pedro84

Technical User
Mar 27, 2006
15
GB
Does anyone know of a way to automate the unmounting of volumes in Networker 7.2?

I'd like my colleagues at other sites to be able to change the volumes without me having to unmount them each time

Thanks
 
We run 7.1.1 on Solaris 8 and 9. We unload the cartridges by a cron job. The job has a line like this:

system(nsrjb -j lto1 -H)

The -j specifies the name of the jukebox, obviously if you only have one jukebox you wouldn't need to use that.

From the nsrjb man page:

-H Resets the jukebox hardware (and the NetWorker database
representing the jukebox) to a consistent state. The
jukebox clears the transport and then unmounts and
unloads volumes from the drives to slots.
 
I think this is not a good idea, because reseting the jukebox with a cron could generate errors if a job is running...

Why do you need unmounting volumes? if you have an autochanger you dont need to do this; if you have a standalone tape, you have to manually mount an appendable tape in the drive for the next backup...
 
I´m not quite sure what you´re after, but try using the
"nsrjb -uv" command.

ex.
nsrjb -uv 000024 (by volume name)
nsrjb -uv -S 13 (by slot number)
nsrjb -uv -f \\.\Tape0 (by device name)

This will unload the volume from the device it is mounted
in. Then you could use "nsrjb -w volume OR -S slot" to withdraw the tape and send it to the I/O port (CAP) for easy removal by the admin on site (if your lib has an I/O port). The withdraw command support several volume names or a slot range.

Ex.
nsrjb -w -S 1-10 (will eject volumes in slots 1-10)
nsrjb -w 000024 (will eject volume 000024)

Cheers!
Maverick
 
In our case, we unmount the tapes so we can remove them from the jukebox to send them offsite. When our backup finishes, the tapes remain in the drives. The cron job is the job that we use to schedule the backup, the line to remove the tapes is in another script that is called when the first script finishes.
 
I'd like nsrjb -u to be triggered when a group has finished successfully so that the local IT can remove the tape ready for collection without my involvement.

As speculos mentioned, if I have a scheduled task it may run whilst the device is busy and cause problems so I am just looking for a way to trigger the command.

Thanks

 
You could write a script to check to see if a backup is running and only run the reset command when it's not running.


 
You could write a script to check to see if a backup is running and only run the reset command when it's not running. That's basically what we do.


 
if your referring to drives in a Jukebox/Silo etc, set the "Idle Device Timeout" from its default of 0, to maybe 5.....then the device will unmount and eject the media....

everyone has supplied nsrjb commands, so that would be that everyone assumes you are using a jukebox/silo.....

dont use the nsrjb -H for unloading your drives......you Dont Reset your computer everytime you want to close a folder...... thats too extreme...

from the Storage node controlling the jukebox...
# nsrjb -s <nsr svr> -uv
(leaving out a device, will have it unload all available devices in the jukebox)

if its just standalone devices...not part of an automated jukebox etc....
just run
# nsrmm -uvv


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top