NBU应用系列之三:在AIX环境下如何创建ovpass
mkdev -c media_changer -s fcp -t ovpass -p controller -w scsi_id,lun 手册中对参数的解释如下:
- controller is the logical identifier of the drive’s SCSI adaptor, sUCh as scsi0, scsi1 or vscsi1.
- id is the SCSI ID of the robotic connection.
- scsi_id is the fibre channel identifier for the N_Port address (D_ID) of the robotic connection.
- lun is the logical unit number of the robotic connection.
CuAt:
name = "rmt0"
attribute = "scsi_id" ----》 可以看出scsi_id是:”0x21400”
value = "0x21400"
type = "R"
generic = "D"
rep = "s"
nls_index = 6
…………… < 省略若干信息 >
#
b)确定lun: 假如用户的环境是机械手和驱动器串到一起后再连接到SNC上面,我们可以通过SNC的治理软件就可以知道机械手的lun。强烈推荐使用这种方法。 假如没有SNC的治理界面,再磁带库的液晶面板上面可以查到机械手和驱动器的scsi id。经验之谈是:最好将机械手调到驱动器前,而且机械手和驱动器的scsi最好是连续的。 SNC一般都会占用lun0,其他设备从1开始排。我们只要将其他驱动器的lun找到,假如SNC和驱动器的lun是连续的,那么机械手的就是最大的lun+1。假如SNC和驱动器的lun不是连续的,缺的那个就是机械手的lun。(缺省情况SNC是自动映射lun的,假如用户修改了配置,就必须使用SNC的工具去查机械手的lun,否则很难猜)。 我们可以用这样的方法确定驱动器的lun。
#odmget -q "name=rmt0" CuAt
…………… < 省略若干信息 >
CuAt:
name = "rmt0"
attribute = "lun_id" ----》确定磁带机的lun为2
value = "0x2000000000000"
type = "R"
generic = "D"
rep = "s"
nls_index = 7
…………… < 省略若干信息 > 再我这个环境中只有一个驱动器,lun是2,SNC缺省使用0,所以机械手的lun是1. c)确定Controll: #lsdev -Cc tape
rmt0 Available 1A-08-01 Other FC SCSI Tape Drive - 得到卡的编号:1A-08 # lsdev -C grep -i 1A-08-01
fscsi1 Available 1A-08-01 FC SCSI I/O Controller PRotocol Device ----》得到控制器的设备名:fscsi1
hdisk2 Defined 1A-08-01 Other FC SCSI Disk Drive
hdisk3 Available 1A-08-01 Other FC SCSI Disk Drive
hdisk4 Available 1A-08-01 Other FC SCSI Disk Drive 现在就可以使用下面的命令创建ovpass:
mkdev -c media_changer -s fcp -t ovpass -p fscsi1 -w 0x21400,1
3.机械手和驱动器分别直连或者通过SNC上的不同口连到SAN的交换机上面: 随着纯光纤的带库大批量的被用户使用,这种情况是比较普遍的。再这种环境下,查找机械手的scsi_id就比较麻烦了。方法只有一个,登陆到SAN交换机上,查看和机械手相连的端口的port id。假如机械手是直连SAN 的switch,lun一般为0,假如机械手是通过SNC转上来的,lun一般为1(前提是SNC没接其他设备,假如有就需要用上面介绍的方法找lun)。
switch1g:admin> portshow 4
portFlags: 0x23805b PRESENT ACTIVE F_PORT G_PORT U_PORT LOGIN NOELP LED ACCEPT
portType: 3.1
portState: 1 Online
portPhys: 6 In_Sync
portScn: 6 F_Port
portRegs: 0x81030000
portData: 0x10f5c510
portId: 021400 ----》就是scsi_id.
portWwn: 20:04:00:60:69:13:04:9e Distance: normal …………… < 省略若干信息 > 上面就是最常用的几种方法创建ovpass,建好后要可以通过下面的方法验证ovpass是否能正常工作。 使用tpautoconf看看能否找到机械手,假如能还用用roBTest测试一下是否能移带。 # tpautoconf -r
TPAC45 ADIC Scalar 100 3.22 ADIC9U0091A22 -1 -1 -1 -1 /dev/ovpass0 - -