如何获取带库驱动器

如何获取带库驱动器(Tape Drive)Element

首先需要配置好带库,然后在AIX上认到设备。(请先安装Atape驱动)

1>获取设备信息
# lsdev -Cc tape
rmt0 Available 08-08-00-1,0 LVD SCSI 4mm Tape Drive
rmt1 Available 0H-08-01 IBM 3590 Tape Drive and Medium Changer (FCP)
rmt2 Available 0H-08-01 IBM 3590 Tape Drive and Medium Changer (FCP)
rmt3 Available 0H-08-01 IBM 3590 Tape Drive and Medium Changer (FCP)
rmt4 Available 0H-08-01 IBM 3580 Ultrium Tape Drive (FCP)
rmt5 Available 0H-08-01 IBM 3580 Ultrium Tape Drive (FCP)
smc0 Available 0H-08-01 IBM 3576 Library Medium Changer (FCP)
#

其中smc0对应3576带库。rmt4 和rmt5分别对应带库中的两个驱动器

2>查询带库信息
# tapeutil -f /dev/smc0 inventory


Drive Address 256
Drive State .................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Robot Access Allowed ........... Yes
Source Element Address Valid ... No
Media Inverted ................. No
Same Bus as Medium Changer ..... Yes
SCSI Bus Address Vaild ......... No
Logical Unit Number Valid ...... No
Volume Tag .....................

Drive Address 257
Drive State .................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Robot Access Allowed ........... Yes
Source Element Address Valid ... No
Media Inverted ................. No
Same Bus as Medium Changer ..... Yes
SCSI Bus Address Vaild ......... No
Logical Unit Number Valid ...... No
Volume Tag .....................

Slot Address 4159
Slot State ..................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. Yes
Robot Access Allowed ........... Yes
Source Element Address ......... 4159
Media Inverted ................. No
Volume Tag ..................... A00709L3

上面是带库信息的部分输出

可以看到Drive Address 256和Drive Address 257表示两个驱动器的element number

而Slot Address 4159对应的Volume Tag ..................... A00709L3,表示该槽位上有带子,其中A00709L3是带子的barcode

下面我们要做的事情就是获取rmtX与element的对应关系

3>定位测试

下面的命令是将Slot 4159中的带子装入Drive 256
# tapeutil -f /dev/smc0 move 4159 256
Moving medium: source 4159, destination 256...
#

接着在驱动器上操作带子
# tctl -f /dev/rmt4 rewoffl
#
如果系统没有返回错误信息,说明/dev/rmt4设备对应的驱动器的element number是256

对于有多个驱动器的带库来说就要进行随后的操作

将带子移动到另一个驱动器中

# tapeutil -f /dev/smc0 move 256 257
Moving medium: source 256, destination 257...、#

再在驱动器上操作带子
# tctl -f /dev/rmt5 rewoffl
#
如果遇到错误,则尝试下个rmtX

测试完成后再将磁带放回原来的槽位上
# tapeutil -f /dev/smc0 move 257 4159
Moving medium: source 257, destination 4159...
#

现在我们已经知道了每个rmtX所对应的element number。
接下来就能在TSM中用define drive <libname> <drvname> element=<eleno> online=yes来定义驱动器了。

你可能感兴趣的:(设备,驱动器)