Thursday, February 7, 2019

NetBackup Tutorial: Steps to verify device configuration using "robtest"

NetBackup Tutorial: Steps to verify device configuration using "robtest"


The process to absolutely verify that the drive path mapping is correct on all of the media servers is a bit time consuming, but will ensure that everything is correct. 

Step 1 
Please note that this test cannot be run while VERITAS NetBackup (tm) is attempting backups, restores, duplicates, or any other actions that involve the robot and drives. 

Step 2 
Acquire the output of " /usr/openv/volmgr/bin/tpconfig -d " from each of the media servers. This is the drive configuration within NetBackup for each server. 



Step 3 
On the robotic control host (probably the master), run /usr/openv/volmgr/bin/robtest. Keep this running during the entire procedure. After selecting the robot, it asks you to enter commands; enter : s d. 

This will give the status of the drives. Make sure that none of the drives contain a tape. If they do, remove the tapes and place them back into slots. 
The command to run a status of all the slots (to find empty ones) is : s s. 
The command to unload a tape from drive 1 is : unload d1 
The command to move a tape from drive 1 to slot 15 is : m d1 s15 

If the unload or move commands return any errors, you will need to manually eject the tapes from the robot and move them into slots. 

Step 4 
Once there are no tapes in any of the drives, move a tape (that is not a cleaning tape) into drive 1. 
The command to move a tape from slot 5 to drive 1 is: m s5 d1. 
Now, from the command line of each server, run the following: 

mt -f /dev/rmt/0cbn status 

The specific path ( /dev/rmt/0cbn) will be determined by the output of the tpconfig -d command for each server. The path to any given robotic drive may not be the same on each media server. 

If the command returns a message indicating that there is no tape loaded or the drive is offline, you will need to manually determine which device path is correct for drive 1 on that server. Do this by running through all the possible device paths until the correct one is determined: 

mt -f /dev/rmt/1cbn status 
mt -f /dev/rmt/2cbn status 
mt -f /dev/rmt/3cbn status 
...etc... 

Do not change anything at this point. Simply make note of any device paths that need to be corrected. 

Step 5 
Once you have run through the drive path verification on each of the media servers, unload the tape from robtest. 
The command to unload a tape from drive 1 is : unload d1 
If the unload fails, the command to SCSI unload the drive is : 
mt -f /dev/rmt/0cbn offline (device path specific to the server and drive being run on) 
Once the tape is unloaded, move it to the next drive. 
The command to move a tape from drive 1 to drive 2 is: m d1 d2 

Step 6 
Repeat steps 4 and 5 for each of the drives. When you are done, you will have an accurate mapping of all the drive device paths for each server. 
Using the GUI or tpconfig , modify the device paths as needed, only restarting the NetBackup daemons after all changes have been made (otherwise it will take too long). 

For IRIX, the mt command is identical, but the device path names look different. 
In Windows NT, there isn't a good way to do this; the OS does not seemed developed to notice such things. But what can be done is: 

Click Start | Administrator | Backup
Under the Start menu should be a folder named administrator. Start the backup application in it. It will show all of the devices that have media in them. The media shows up as foreign. Select the device, then from the menu, select Operations | Hardware Setup

This will give you the target, LUN, etc for the device so you can verify which one it actually is. 



How to use robtest commands from the command line with no user intervention required: 



/usr/openv/volmgr/bin/robtest calls a separate utility to run the commands against the robot.
For instance it you have a Tape Library DLT robot, it calls tldtest. 
For an Automated Cartridge System Library Software (ACSLS) controlled robot, it calls acstest.

When robtest is started and a robot is selected, the appropriate utility is called:

%robtest

Configured robots with local control supporting test utilities:

 TS8(0)     robotic path = /dev/sg/c0t1l0
 TLD(1)     robotic path = /dev/sg/c1t2l0
 TLD(2)     robotic path = filer:mc0

Robot Selection
---------------
 1)  TS8 0
 2)  TLD 1
 3)  TLD 2
 4)  none/quit

Enter choice: 2

Robot selected: TLD(1)   robotic path = /dev/sg/c1t2l0
invoking robotic test utility:
/usr/openv/volmgr/bin/tldtest -r /dev/sg/c1t2l0 -d1 /dev/rmt/4cbn -d2 /dev/rmt/5cbn -d3 /dev/rmt/2cbn -d4 /dev/rmt/3cbn 
Opening /dev/sg/c1t2l0
MODE_SENSE complete
Enter tld commands (? returns help information)

Any command that can be run at this point, can be run by echoing it and piping the command to the device the utility (in this case tldtest) opened.

For example to check the status of the slots in this robot, the command would be:

echo "s s" | /usr/openv/volmgr/bin/tldtest -r /dev/sg/c1t2l0

with the result:

Opening /dev/sg/c1t2l0
MODE_SENSE complete
Enter tld commands (? returns help information)
slot 1 (addr 1000) contains Cartridge = yes
Source address = 10
Barcode = FX0023                          
slot 2 (addr 1001) contains Cartridge = yes
Source address = 502
Barcode = 000014                          
slot 3 (addr 1002) contains Cartridge = yes
Source address = 502
Barcode = 000002                          
slot 4 (addr 1003) contains Cartridge = yes
Source address = 503
READ_ELEMENT_STATUS complete

To check the status of the drives, the command would be run this way:

echo "s d" | /usr/openv/volmgr/bin/tldtest -r /dev/sg/c1t2l0

with the result:

Opening /dev/sg/c1t2l0
MODE_SENSE complete
Enter tld commands (? returns help information)
drive 1 (addr 500) access = 1 Contains Cartridge = yes
Source address = 1044 (slot 45)
Barcode = RBS324                          
SCSI ID from drive 1 is 1
drive 2 (addr 501) access = 1 Contains Cartridge = no
SCSI ID from drive 2 is 2
drive 3 (addr 502) access = 1 Contains Cartridge = no
drive 4 (addr 503) access = 1 Contains Cartridge = no
READ_ELEMENT_STATUS complete


To determine what commands can be echoed in this way, enter "?" under robtest for a command usage explanation.



Share this

0 Comment to "NetBackup Tutorial: Steps to verify device configuration using "robtest""

Post a Comment