How to do tape device discovery for NetBackup device configuration from RHEL Linux command line

How-To Steps:

Scan and discover SCSI devices in Linux cli:

scsi-rescan

OR:

ls -l /sys/class/scsi_host/
echo “- – -” > /sys/class/scsi_host/host0/scan
echo “- – -” > /sys/class/scsi_host/host1/scan
echo “- – -” > /sys/class/scsi_host/host2/scan
echo “- – -” > /sys/class/scsi_host/host3/scan
echo “- – -” > /sys/class/scsi_host/host4/scan
echo “- – -” > /sys/class/scsi_host/host5/scan
echo “- – -” > /sys/class/scsi_host/host6/scan

The commands to scan and discover tape devices is scan.

This command is located under the following path(Netbackup installation path):

UNIX/Linux: /usr/openv/volmgr/bin/

Scan all locally attached devices:
./scan

For complete usage and additional switches, please review the NetBackup Command Reference Guide.

Note: On UNIX/Linux, NetBackup commands discover devices by sending SCSI inquiries to all known SCSI devices via SCSI generic passthrough. If SCSI passthrough devices are not created or configured correctly, devices may be missing from the listing. NetBackup supplies passthrough drivers on Solaris (sg), and AIX (ovpass). For other UNIX/Linux, refer to Operating System support channel for passthrough driver support.

Output Example:

###rescan host scsi devices

[root@testos bin]# scsi-rescan
Scanning SCSI subsystem for new devices
Scanning host 14 for all SCSI target IDs, all LUNs
Scanning for device 14 0 0 0 …
OLD: Host: scsi14 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: Ultrium 5-SCSI Rev: I66Z
Type: Sequential-Access ANSI SCSI revision: 06
Scanning for device 14 0 1 0 …
OLD: Host: scsi14 Channel: 00 Id: 01 Lun: 00
Vendor: HP Model: Ultrium 5-SCSI Rev: I66Z
Type: Sequential-Access
2 new or changed device(s) found.
[10:0:0:0]
[10:0:1:0]
0 remapped or resized device(s) found.
0 device(s) removed.

###scanning new tapes by netbackup tool

[root@testos ~]# cd /usr/openv/volmgr/bin/
[root@testos bin]# ./scan


* SDT_TAPE SDT_CHANGER ***


Unable to intialize the device mappings table, status = 1

Device Name : “/dev/nst31”
Passthru Name: “/dev/sg62”
Volume Header: “”
Port: -1; Bus: -1; Target: -1; LUN: -1
Inquiry : “HP Ultrium 5-SCSI I66Z”
Vendor ID : “HP “
Product ID : “Ultrium 5-SCSI “
Product Rev: “I66Z”
Serial Number: “F0027B5085”
WWN : “”
WWN Id Type : 0
Device Identifier: “”
Device Type : SDT_TAPE
NetBackup Drive Type: Not Found(6)
Removable : Yes
Device Supports: SCSI-6
Flags : 0x0

Device Name : “/dev/nst30”
Passthru Name: “/dev/sg61”
Volume Header: “”
Port: -1; Bus: -1; Target: -1; LUN: -1
Inquiry : “HP Ultrium 5-SCSI I66Z”
Vendor ID : “HP “
Product ID : “Ultrium 5-SCSI “
Product Rev: “I66Z”
Serial Number: “F0027B500D”
WWN : “”
WWN Id Type : 0
Device Identifier: “”
Device Type : SDT_TAPE
NetBackup Drive Type: Not Found(6)
Removable : Yes
Device Supports: SCSI-6
Flags : 0x0

###find the number of total discovered tapes

[root@testos bin]# ./scan |grep nst |wc -l
2

Leave a Comment