AIX下配置磁带库机械臂

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Atape 简介
IBM AIX Atape 驱动提供对 IBM 磁带驱动器以及机械臂设备(Media Changer)
的支持。

Atape 不仅可以给各种应用程序提供基本的磁带操作,例如对备份、恢
复;提供基本的机械臂操作,例如载入(Mount)、载出(Unmount)磁带(Cartridges
/Tapes);还为磁带管理系统提供更高级的功能。

该驱动对应用程序是透明的。

正确安装驱动以后,应用程序可以使用驱动提供的各种功能。

安装包下载:IBM Atape 安装包可以从
ftp:///storage/devdrvr/AIX 下载。

从下面的网站确定
你的操作系统的补丁级别是否符合要求:
/tape/lto/compatibility.html
下载步骤如下:
# ftp
Connected to .
220-******************************************************************************* 220-* *
220-* IBM's internal systems must only be used for conducting IBM's *
220-* business or for purposes authorized by IBM management. *
220-* *
220-* Use is subject to audit at any time by IBM management. *
220-* *
220-******************************************************************************* 220-
220 service FTP server (Version wu-2.6.2(5) Custom Sat May 28 01:48:31 MDT 2005) ready. Name (:root): anonymous
331 Guest login ok, send any password.
Password:
230 Guest login ok, access restrictions apply.
ftp> cd /storage/devdrvr/AIX
250-Please read the file README
250- it was last modified on Mon Oct 8 17:36:52 2007 - 520 days ago
250 CWD command successful.
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
Atape.10.7.3.0.bin
Atape.11.3.4.0.bin
Atape.8.4.9.0.bin
Atape.9.7.5.0.bin
Atape.README
Atape.fixlist
README
atldd.5.5.1.0.bin
atldd.6.7.7.0.bin
atldd.Readme
atldd.fixlist
226 Transfer complete.
ftp> bin
200 Type set to I.
ftp> mget Atape.11.3.4.0.bin
mget Atape.11.3.4.0.bin? y
200 PORT command successful.
150 Opening BINARY mode data connection for Atape.11.3.4.0.bin (5376000 bytes). 226 Transfer complete.
5376000 bytes received in 1.261 seconds (4165 Kbytes/s)
local: Atape.11.3.4.0.bin remote: Atape.11.3.4.0.bin
安装过程
在安装新版本的设备驱动之前,建议先卸载老版本的驱动,并保证磁带设备已经
上电、功能正常并已经正确连接到 AIX 系统上。

可以使用命令 :
installp –acXd Atape.x.x.x.x Atape.driver
下面来安装我们下载的 Atape.11.3.4.0.bin:
# installp -acXd Atape.11.3.4.0.bin Atape.driver
+-----------------------------------------------------------------------------+ Pre-installation Verification...
+-----------------------------------------------------------------------------+ Verifying selections...done
Verifying requisites...done
Results...
SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.
Selected Filesets
-----------------
Atape.driver 11.3.4.0 # IBM AIX Enhanced Tape and Me...
<< End of Success Section >>
+-----------------------------------------------------------------------------+ BUILDDATE Verification ...
+-----------------------------------------------------------------------------+ Verifying build dates...done
FILESET STATISTICS
------------------
1 Selected to be installed, of which:
1 Passed pre-installation verification
----
1 Total to be installed
0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
+-----------------------------------------------------------------------------+ Installing Software...
+-----------------------------------------------------------------------------+ installp: APPLYING software for:
Atape.driver 11.3.4.0
. . . . . << Copyright notice for Atape >> . . . . . . .
IBM AIX Enhanced Tape and Medium Changer Device Driver
(C) COPYRIGHT International Business Machines Corp. 1993 2005
All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
. . . . . << End of copyright notice for Atape >>. . . .
Checking for existing Atape devices...
Installing AIX Version 6.1 Atape.driver...
Adding device prototype...
Adding odm and smit entries...
Adding catalogs...
Adding trace template...
Adding error template...
6 entries added.
0 entries deleted.
0 entries updated.
Adding utility programs...
Finished processing all filesets. (Total time: 11 secs).
0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
0503-408 installp: bosboot process starting...
bosboot: Boot image is 36475 512 byte blocks.
0503-292 This update will not fully take effect until after a
system reboot.
* * * A T T E N T I O N * * *
System boot image has been updated. You should reboot the
system as soon as possible to properly integrate the changes
and to avoid disruption of current functionality.
installp: bosboot process completed.
+-----------------------------------------------------------------------------+ Summaries:
+-----------------------------------------------------------------------------+ Installation Summary
--------------------
Name Level Part Event Result
------------------------------------------------------------------------------- Atape.driver 11.3.4.0 USR APPLY SUCCESS
如上例所示,如果 Installation Summary 给出的结果是 SUCCESS, Atape 驱动
已经正确安装到系统中了。

当然,也可以使用 smit 来安装:
#smitty
-> Software Installation and Maintenance
-> Install and Update Software
-> Install Software
-> * INPUT device / directory for software 输入安装包位置
如下例:
Install Software
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* INPUT device / directory for software .
* SOFTWARE to install [Atape > +
PREVIEW only? (install operation will NOT occur) no +
COMMIT software updates? yes +
SAVE replaced files? no +
AUTOMATICALLY install requisite software? yes +
EXTEND file systems if space needed? yes +
OVERWRITE same or newer versions? no +
VERIFY install and check file sizes? no +
Include corresponding LANGUAGE filesets? yes +
DETAILED output? no +
Process multiple volumes? yes +
ACCEPT new license agreements? no +
Preview new LICENSE agreements? no +
需要注意的是,PREVIEW only 一项需要置成 no,这样驱动才真正会被安装到系
统中。

选择确认后,回车完成安装过程。

安装完成后 , 用如下命令来确认,安装的版本和状态:
lslpp –l Atape.driver
# lslpp -l Atape.driver
Fileset Level State Description
---------------------------------------------------------------------------- Path: /usr/lib/objrepos
Atape.driver 11.3.4.0 COMMITTED IBM AIX Enhanced Tape and
Medium Changer Device Driver
配置磁带驱动器和机械臂
安装结束后,需要进行配置以后,才能使用设备驱动。

使用命令 #cfgmgr 来重新发现系统连接的设备,并进行配置。

# cfgmgr
上例中,cfgmgr 执行完毕,没有报错,则配置成功。

当然重新启动 AIX 系统也能达到重新配置的效果。

在 Atape 驱动已经安装而且设备已经配置以后,系统通过 /dev 目录下的 smc* 文件来表示物理的机械臂,rmt* 表示磁带驱动器。

# lsdev -Cc tape 能列出系统所带的所有磁带设备
# lsdev -Cc tape
rmt0 Available 01-01-01 IBM 3580 Ultrium Tape Drive (FCP)
rmt1 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt2 Available 01-01-01 IBM 3580 Ultrium Tape Drive (FCP)
smc8 Available 01-01-01 IBM 3584 Library Medium Changer (FCP)
验证机械臂以及驱动器是否工作正常
需要使用 tapeutil 对机械臂和驱动器来进行验证。

tapeutil 是 Atape 提供的设备测试应用程序,它是对磁带库以及驱动器进行直接操作的接口。

安装 Atape 后,可直接运行 tapeutil 来启动程序。

下面介绍一下如何使用 tapeutil 对系统连接的磁带驱动器和机械臂进行测试。

# tapeutil
General Commands:
1. Open a Device 5. Inquiry 9. Log Sense Page
2. Close a Device 6. Test Unit Ready 10. Mode Sense Page
3. Device Info 7. Reserve Device 11. Release Device
4. Tape Drive Service Aids 8. Request Sense Q. Quit Program
Medium Changer Commands:
12. Element Information 16. Move Medium
13. Position To Element 17. Load/Unload Medium
14. Element Inventory 18. Initialize Element Status
15. Exchange Medium 19. Prevent/Allow Medium Removal
Tape Commands:
20. Query/Set Parameters 30. Read and Write Tests
21. Prevent/Allow Medium Removal 31. Unload/Load Tape
22. Rewind 32. Erase
23. Erase Gap 33. Write Filemarks
24. Forward Space Filemarks 34. Backward Space Filemarks
25. Forward Space Records 35. Backward Space Records
26. Space to End of Data 36. Query/Set Tape Position
27. Log Sense 37. Read or Write Files
28. Display Message 38. Get Drive Encryption Settings
29. Synchronize Buffers 39. Report Density Support
40. Test Encryption Key Path/Setup
Enter Selection:
如何验证磁带驱动器是否正确安装:
1. 打开 AIX 窗口
2. 输入 tapeutil
3. 输入 1(打开一个设备)
4. 输入 /dev/rmt0(需要验证的设备文件)
5. 输入 1(Read/Write)
6. 输入 3(Device Info)
7. 输入 5(Inquiry)选择 0,对设备进行基本测试
8. 输入 6(Test Unit Read)确认没有错误。

9. 输入 18(Initialize Element Status)
10. 输入 14(Element Inventory)查看所有带库中所有磁带
11. 从上一步结果中,选择一个可写的空闲磁带,查看其序列号,并选择一个空闲的磁带插槽
12. 输入 16(Move Medium),指定磁带的地址和空闲磁带插槽的地址。

确认磁带被放置到正确的位置
13. 输入 14 (Element Inventory),确认磁带库信息被更新
14. 输入 2 (Close a Device)
15. 输入 Q (退出程序)
如何验证机械臂是否工作正常:
1. 打开 AIX 窗口
2. 输入 tapeutil
3. 输入 1(打开一个设备)
4. 输入 /dev/smc0
5. 输入 1 (Read/Write)
6. 输入 3 (Device Info)
常用磁带设备管理命令
查看所有系统连接的设备:
下例列出系统识别出的所有带库机械臂和磁带驱动器的基本信息:lsdev -Cc tape
# lsdev -Cc tape
rmt2 Available 01-01-01 IBM 3580 Ultrium Tape Drive (FCP)
rmt3 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt4 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt5 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt6 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt7 Available 01-01-01 LTO Ultrium Tape Drive (FCP)
rmt8 Available 01-01-01 LTO Ultrium Tape Drive (FCP)

smc5 Available 01-01-01 IBM 3584 Library Medium Changer (FCP) smc6 Available 01-01-01 IBM 3576 Library Medium Changer (FCP) smc7 Available 01-01-01 IBM 3584 Library Medium Changer (FCP) smc8 Available 01-01-01 IBM 3584 Library Medium Changer (FCP)
输出结果中,所有 rmt 开头的设备为磁带驱动器,而 smc 开头的设备为带库机械臂。

查看设备的具体配置:
查看设备的具体信息,如查看磁带驱动器 rmt-0 的信息:
lscfg -vl rmt-0
# lscfg -vl rmt-0
rmt-0 U789D.001.DQDWVMV-P1-C3-T2-W5005076300810821-L0
IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD3
Serial Number (0007805879)
Device Specific.(FW)........73P5
该设备为 IBM3580 的磁带驱动器,其序列号为 0007805879。

查看机械臂smc0 的具体信息:
# tapeutil -f /dev/smc0 inquiry
Issuing inquiry...
Inquiry Data, Length 58
0 1 2 3 4 5 6 7 8 9 A B C D E F 0123456789ABCDEF
0000 - 0880 0302 3500 2002 4942 4D20 2020 2020 [.€..5. .IBM ]
0010 - 3033 3538 344C 3332 2020 2020 2020 2020 [03584L32 ]
0020 - 3830 3871 3133 3030 3030 3031 3331 3030 [808q130000013100]
0030 - 3038 2030 0200 0000 0000 [08 0...... ]
可以看到示例的设备为 IBM 3584 的带库。

使用持续命名支持
持续命名支持用来确保即使在系统被重启时,所有的设备仍然会根据 SCSI ID,LUN ID 和 HBA 卡被配置成相同的逻辑名。

AIX 操作系统重启时,HBA 卡会重新发现设备,并给每个设备按照被发现的顺序分配一个默认的逻辑名(格式为 /dev/smc*)。

例如,如果有三个磁带驱动器被接到并行 SCSI 适配器上,每一个 LUN ID 都是0,目标地址分别是 0,1,2;HBA 卡会将三个驱动器初始配置成
∙rmt0 目标地址 0,lun 0 可用
∙rmt1 目标地址 1,lun 0 可用
∙rmt2 目标地址 2,lun 0 可用
但是在下次系统重启时,如果命名为 rmt1 的设备未上电,或者未连接。

HBA 卡则会初始配置两个设备为如下的逻辑名:
∙rmt0 目标地址 0,lun 0 可用
∙rmt1 目标地址 2,lun 0 可用
由此可见,在 SAN 网络拓扑发生变化时,如果不启用持续命名支持,系统的逻辑文件将发生变化,需要重新对应用程序进行配置。

可以使用如下命令来改变设备的逻辑名
chdev –l rmt0 –a new_name=rmt-0
也可以使用 smit 来改变。

Smit
选择 Tape Drive
选择 Change/Show Characteristics of a Tape Drive
选择要改变的设备的逻辑名
在 New Logical Name 栏里,输入新的逻辑名,该逻辑名应区别与 AIX 默认的逻辑名(rmt*)
下例将设备文件 rmt0 改变为 rmt-0:
# chdev -l rmt0 -a new_name=rmt-0
清除设备配置
将磁带驱动器置于离线状态:
#rmdev -l smcn
下例将设备 smc0 置于离线状态:
# rmdev -l smc0
smc0 Defined
磁带设备置于离线状态并且清除磁带驱动器在配置数据库中的定义:
rmdev -l lmcpn –d
下例将机械臂 smc0 从系统中删除:
# rmdev -l smc0 -d
smc0 deleted
可以看到删除后,设备 smc0 已不在设备配置数据库中,再次删除会报错:
# rmdev -l smc0
rmdev: 0514-519 The following device was not found in the customized device configuration database:
name = 'smc0'
查看与机械臂匹配的磁带驱动器
如果系统连接了一个大型的 SAN,系统会看到多个机械臂和多个磁盘驱动器。

可以通过以下命令来确定某一机械臂对应的磁带驱动器。

tapeutil -f /dev/smc0 devids
该命令会列出所有与机械臂匹配的磁带驱动器的具体信息:
如下例,与其匹配的磁带驱动器 Device ID 分别是 0007805879 和1200000783。

# tapeutil -f /dev/smc0 devids
Reading element device ids...
Drive Address 281
Drive State .................... Abnormal
ASC/ASCQ ....................... 8100 (Drive Present)
Media Present .................. No
Robot Access Allowed ........... No
Source Element Address Valid ... No
Media Inverted ................. No
Same Bus as Medium Changer ..... Yes
SCSI Bus Address Vaild ......... No
Logical Unit Number Valid ...... No
Device ID ...................... IBM ULT3580-TD3 0007805879
Drive Address 282
Drive State .................... Abnormal
ASC/ASCQ ....................... 8100 (Drive Present)
Media Present .................. No
Robot Access Allowed ........... No
Source Element Address Valid ... No
Media Inverted ................. No
Same Bus as Medium Changer ..... Yes
SCSI Bus Address Vaild ......... No
Logical Unit Number Valid ...... No
Device ID ...................... IBM ULTRIUM-TD3 1200000783
可以看到 rmt0,rmt1 所对应的 device ID 0007805879 以及 1200000783 与/dev/smc0 所带的驱动器序号相同,那么 rmt0,rmt1 就是其中与其匹配的驱动器。

如下例:
# lscfg -vl rmt0
rmt0 U789D.001.DQDWVMV-P1-C3-T2-W5005076300810821-L0
IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD3
Serial Number (0007805879)
Device Specific.(FW)........73P5
# lscfg -vl rmt1
rmt1 U789D.001.DQDWVMV-P1-C3-T2-W5005076300410822-L0
LTO Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULTRIUM-TD3
Serial Number (1200000783)
Device Specific.(FW)........73P5
重新配置系统连接的机械臂和驱动器
define path morkaix1 ibm3576 srctype=server desttype=library
device=/dev/smc0 online=yes
其中的 /dev/smc0 即机械臂在 AIX 系统中的设备文件。

在TSM 中定义驱动器:
define path morkaix1 dr0 srctype=server desttype=drive library= ibm3576 devicename=/dev/rmt0 online=yes
define path morkaix1 dr1 srctype=server desttype= drive library= ibm3576
devicename=/dev/rmt1 online=yes
然后将磁带导入(checkin)到磁带库里:
checkin libv ibm3576 search=yes stat=scr checklabel=yes
可以通过以下命令能看到导入的结果,所有磁带库中磁带会列出来,见图 1。

q libv ibm3576
图 1. 带库中所有磁带列表
接下来,用户可以使用 TSM 来向磁带中备份数据了。

清除设备配置以及卸载Atape
清除设备配置
在卸载 Atape 之前,需要清除磁带驱动器的配置。

首先需要使用命令“lsdev -Cc tape”
来确认系统中所有的设备名,然后用 rmdev 来逐一删除。

命令如下例,将磁带驱动器 rmt1 从系统中删除:
# rmdev -l rmt1 -d
rmt1 deleted
下例删除清除机械臂设备 smc0:
# rmdev -l smc0 -d
smc0 deleted
需要对所有的设备文件一一进行删除,当最后一个设备的配置信息被删除后,设
备的驱动会从内核中卸载出来。

卸载Atape 设备驱动程序
注意:卸载 Atape 时,所有的使用 Atape 驱动的设备必须关闭,不能在使用状
态;否则卸载将会失败。

可以使用 smit 菜单,选择 Atape.driver 来卸载软件或者使用如下命令:
# installp -u Atape.driver
+-----------------------------------------------------------------------------+ Pre-deinstall Verification...
+-----------------------------------------------------------------------------+ Verifying selections...done
Verifying requisites...done
Results...
SUCCESSES
---------
Filesets listed in this section passed pre-deinstall verification
and will be removed.
Selected Filesets
-----------------
Atape.driver 11.3.4.0 # IBM AIX Enhanced Tape and Me...
<< End of Success Section >>
FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 Passed pre-deinstall verification
----
1 Total to be deinstalled
0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
+-----------------------------------------------------------------------------+
Deinstalling Software...
+-----------------------------------------------------------------------------+
installp: DEINSTALLING software for:
Atape.driver 11.3.4.0
Deleting rmt0...
rmt0 deleted
Deleting smc0...
smc0 deleted

Deleting rmt48...
rmt48 deleted
De-installing Atape.driver...
Atape.driver de-installed
Finished processing all filesets. (Total time: 20 secs).
0503-409 installp: bosboot verification starting...
installp: bosboot verification completed.
0503-408 installp: bosboot process starting...
bosboot: Boot image is 36429 512 byte blocks.
0503-292 This update will not fully take effect until after a
system reboot.
* * * A T T E N T I O N * * *
System boot image has been updated. You should reboot the
system as soon as possible to properly integrate the changes
and to avoid disruption of current functionality.
installp: bosboot process completed.
+-----------------------------------------------------------------------------+ Summaries:
+-----------------------------------------------------------------------------+
Installation Summary
--------------------
Name Level Part Event Result
------------------------------------------------------------------------------- Atape.driver 11.3.4.0 USR DEINSTALL SUCCESS
如上例,如果 Installation Summary 给出的结果为 SUCCESS, 那么 Atape 已经被成功删除了。

参考资料
学习
∙参考IBM Tape Device Drivers Installation and User’s Guide
∙参考IBM Tivoli Storage Manager for AIX Administrator's Guide ∙AIX and UNIX 专区:developerWorks 的“AIX and UNIX 专区”提供了
大量与 AIX 系统管理的所有方面相关的信息,您可以利用它们来扩展自己的 UNIX 技能。

∙AIX and UNIX 新手入门:访问“AIX and UNIX 新手入门”页面可了解更多关于 AIX 和 UNIX 的内容。

∙AIX and UNIX 专题汇总:AIX and UNIX 专区已经为您推出了很多的技术专题,为您总结了很多热门的知识点。

我们在后面还会继续推出很多相关的热门专题给您,为了方便您的访问,我们在这里为您把本专区的所有专题进行汇总,让您更方便的找到您需要的内容。

获得产品和技术
∙IBM 试用软件:使用可从 developerWorks 直接下载的软件构建您的下一个开发项目。

讨论
关于作者
王伟,2006 年加入 IBM,现任 CDL Tivoli 软件工程师。

一直从事存储管理软件 TSM 的开发和测试工作。

相关文档
最新文档