Friday, March 9, 2012

Rebuild tape devices on solaris for NetBackup

On NetBackup solaris servers, when I add a new tape drive or change the device paths in anyway (/dev/rmt/ entries changed) I need rebuild the sg devices (in /dev/sg ) as well.

I always use following steps on the solaris host to accomplish this task:

1: run /usr/sbin/rem_drv sg

2: remove everything in /dev/sg/*

3: remove /kernel/drv/sg.conf

4: vi /etc/devlink.tab and remove all type=ddi_pseudo;name=sg stuff

5: remove /usr/openv/volmgr/bin/driver/sg.links and sg.conf files

6: from /usr/openv/volmgr/bin/driver cp sg.links.all to sg.links and sg.conf.all to sg.conf

7: cp sg.build /usr/openv/volmgr/bin to /usr/openv/volmgr/bin/driver/

8: in /usr/openv/volmgr/bin/driver/ run ./sg.build all -mt 15 -ml 7

9: run sg.install

10. init 6

After the server comes up, I will use following commands to check all devices to see if they match up correctly:

bash-3.00# /usr/openv/volmgr/bin/sgscan all
/dev/sg/c0t0l0: Disk (/dev/rdsk/c0t0d0): "LSILOGICLogical Volume"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/8): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/15): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/6): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/12): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/0): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/13): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/16): "IBM ULTRIUM-TD3"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/11): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/14): "STK T10000A"
/dev/sg/c0tw50xxl0: Tape (/dev/rmt/9): "STK T10000A"

bash-3.00# /usr/openv/volmgr/bin/tpautoconf -t
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/0cbn - -
TPAC60 STK T10000A 1.46 531xx -1 -1 -1 -1 /dev/rmt/9cbn - -
TPAC60 STK T10000A 1.48 531xx-1 -1 -1 -1 /dev/rmt/6cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/11cbn - -
TPAC60 IBM ULTRIUM-TD3 93G0 121xx -1 -1 -1 -1 /dev/rmt/16cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/14cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/8cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/13cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/15cbn - -
TPAC60 STK T10000A 1.48 531xx -1 -1 -1 -1 /dev/rmt/12cbn - -


bash-3.00# ls -l /dev/rmt/*cbn
...

From above commands you should be able to match the /dev/rmt/xcbn to the WWN of the drive, you can also find the uniq serial number of the tape drive, thus you can verify from tape library to see if the devices are matched up correctly.

Finish above steps on all servers need such changes, now we just go to NetBackup console (jnbSA) and use the "Configure Storage Devices -- Define robots and drives." wizard to let NetBackup figure out the device entries (for SSO) in device database and define storage unit if necessary.

No comments:

Post a Comment