Using nsradmin to resolve NetWorker devices in service mode

With the introduction of NetWorker 7.4 jukebox or tape devices can be enabled, disabled or placed into service mode.

Service mode was introduced as a means to manage potential failing hardware or other significant event, ie you want to disable a device after it's finished it's current activity. It's powerful, but for most it is automatically used by NetWorker.

A common request I have seen is how to change a device that is in service mode back to enabled, most people would suggest using the NetWorker Management Console, but sometimes it's quicker to do it via the nsradmin utility:

For example:

# nsrjb
Jukebox ADIC@1.1.1: (Ready to accept commands)
   :
   :
   :
drive 1 (/dev/rmt/0cbn) slot : service mode
drive 2 (/dev/rmt/1cbn) slot :

From the about output, we can see that drive 1 (/dev/rmt/0cbn) is currently in service mode.

Within nsradmin we can perform an update to the device to the following to change the state:

# nsradmin
NetWorker administration program.
Use the "help" command for help, "visual" for full-screen mode.

nsradmin> . type: NSR device; name: /dev/rmt/0cbn;
Current query set
nsradmin> print
                  type: NSR device;
                  name: /dev/rmt/0cbn;
               message: service mode;
           volume name: ;
          media family: tape;
            media type: LTO Ultrium-3;
               enabled: Service;
             read only: No;
       target sessions: 4;
          max sessions: 512;
        parent jukebox: ADIC@1.1.1;
     cleaning required: No;
     cleaning interval: 1 months;
     date last cleaned: "Mon Apr 26 09:01:27 2010";
 auto media management: No;
                  ndmp: No;
dedicated storage node: No;
           remote user: ;
              password: ;
           hardware id: ;
                   CDI: SCSI commands;
    TapeAlert Critical: Expired cleaning media;
     TapeAlert Warning: ;
 TapeAlert Information: ;
  device serial number: ;

nsradmin> update enabled: Yes;
enabled: Yes;
Update? yes
updated resource id 11.0.11.11.0.0.0.0.1.111.11.10.0.0.0.0.111.111.111.111(1111)

Then check again:

# nsrjb
Jukebox ADIC@1.1.1: (Ready to accept commands)
     :
     :
     :
drive 1 (/dev/rmt/0cbn) slot : 
drive 2 (/dev/rmt/1cbn) slot :