分享

带库设备其它

 ylzrx 2011-06-27

带库设备其它

2009-09-30 14:52:05|  分类: AIX 阅读75 评论0   字号: 订阅

在实际中配置备份软件、命令操作等情况下,我们经常要使用磁带库设备的element号,有时还需要使用相应的设备文件。为此我们通常通过测试观察的方法确定他们的对应关系。在设备过多或条件不允许的情况下如何确定磁带库设备和操作系统设备文件的对应关系?
我们介绍一种方法:
1)查看有那些磁带设备:
p615:/>lsdev -Cc tape
rmt0 Available 1H-08-01 IBM 3580 Ultrium Tape Drive (FCP)
rmt1 Available 1H-08-01 IBM 3580 Ultrium Tape Drive (FCP)
smc0 Available 1H-08-01 IBM 3583 Library Medium Changer (FCP)
smc1 Available 1H-08-01 IBM 3583 Library Medium Changer (FCP)
2)查看磁带库中的磁带位置情况:
p615:/>tapeutil -f /dev/smc0 invent | more
Reading element status...

Robot Address 1 /*机械臂*/
Robot State .................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................

Import/Export Station Address 16 /*I/O口*/
Import/Export State ............ Normal
ASC/ASCQ ....................... 0000
Media Present .................. No
Import Enabled ................. Yes
Export Enabled ................. Yes
Robot Access Allowed ........... Yes
Source Element Address Valid ... No
Media Inverted ................. No
Volume Tag .....................
……
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 ............... 1
Logical Unit Number Valid ...... No
Volume Tag .....................
……
Slot Address 4096 /*槽位*/
Slot State ..................... Abnormal
ASC/ASCQ ....................... 8300
Media Present .................. Yes
Robot Access Allowed ........... Yes
Source Element Address ......... 4096
Media Inverted ................. No
Volume Tag ...................../*我们知道这里有1合lto1没有条码标签*/

Slot Address 4097
Slot State ..................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. Yes
Robot Access Allowed ........... Yes
Source Element Address ......... 4099
Media Inverted ................. No
Volume Tag ..................... CLNU54L1/*清洗带*/

Slot Address 4098
Slot State ..................... Normal
ASC/ASCQ ....................... 0000
Media Present .................. Yes
Robot Access Allowed ........... Yes
Source Element Address ......... 4096
Media Inverted ................. No
Volume Tag ..................... A00004L2
……

3)查看rmtx和element号之间的对应关系:

3、1)物理位置和sn的关系
3583的控制面板上status/drivers可以看到驱动器的物理位置和sn;wwn:
设备 sn wwn
------ ------ ------
lib 1319585
drv1 1110119982 500308C1426A1001
drv2 1110140955 500308C1426A1004

3、2)物理位置和element的关系
每种带库的都有自己的对应关系,请查阅手册(setup and operation guide):

3、3)sn和element关系:
综合1,2可知
drvx sn element
---- ------ ------
drv1 1110119982 256
drv2 1110140955 257

3、4)rmtx和sn的关系:
使用命令
p615:/>lscfg -vps -l rmt0
rmt0 U0.1-P1-I5/Q1-W500308C1426A1001-L0
IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD2
Serial Number...............1110119982
Device Specific.(FW)........38D0
p615:/>lscfg -vps -l rmt1
rmt1 U0.1-P1-I5/Q1-W500308C1426A1004-L0
IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD2
Serial Number...............1110140955
Device Specific.(FW)........38D0

3、6)rmtx和element的关系:
综合3,4可知
rmtx drvx sn element
---- ---- ------ ------
rmt0 drv1 1110119982 256
rmt1 drv2 1110140955 257

另外,如果是光纤设备,wwn也是一个识别的方法。
AIX查看每个设备的wwn:
p615:/>lsattr -El rmt1


在AIX中如何改变LTO设备的参数
如果在AIX中需要改变默认的参数如压缩、块大小、缓冲区等,可以使用
smit工具。
具体的方法如下:
1)确定AIX中要修改的设备
# lsdev -Cc tape
smc0 Available 14-08-00-6,0 IBM 3583 Library Medium Changer
rmt0 Available 14-08-00-0,0 IBM 3580 Ultrium Tape Drive
rmt1 Available 14-08-00-1,0 IBM 3580 Ultrium Tape Drive
rmt2 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc1 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)
rmt3 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc2 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)
rmt4 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc3 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)
通过上面的信息我们可以知道系统连接了两个磁带库:
a)用SCSI连接的3583,smc0带两个驱动器rmt0,rmt1。
smc0 Available 14-08-00-6,0 IBM 3583 Library Medium Changer
rmt0 Available 14-08-00-0,0 IBM 3580 Ultrium Tape Drive
rmt1 Available 14-08-00-1,0 IBM 3580 Ultrium Tape Drive

b)用光纤连接的3584,三个驱动器各自的control path都被使能。
rmt2 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc1 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)
rmt3 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc2 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)
rmt4 Available 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
smc3 Available 30-68-01 IBM 3584 Library Medium Changer (FCP)

1.1)假设我们要修改SCSI连接的3583上的SCSI ID=2的驱动器的参数:
通过分析我们可以确定rmt1的SCSI ID是1,正是我们要修改的对象。

1.2)假设我们要修改光纤连接的3584上的驱动器的参数:
我们还要通过三个驱动器的WWN来区分他们。首先驱动器的WWN可以
通过驱动器上面的标签得到,然后你可以使用lsattr命令得到WWN和
设备名的对应关系:
#lsattr -El rmt2
block_size 0 Block Size (0=Variable Length) True
compress yes Use Hardware Compression on Tape True
autoload no Use Autoloading Feature at End-of-Tape True
logging no Activate volume information logging True
max_log_size 500 Maximum size of log file (in # of entries) True
space_mode SCSI Backward Space/Forward Space Record Mode True
rew_immediate no Use Immediate Bit in Rewind Commands True
trailer_labels no Trailer Label Processing True
retain_reserve no Retain Reservation False
devtype ULT3580- Device Type False
scsi_id 0x213ca SCSI Target ID True
lun_id 0x0 Logical Unit Number True
location Location True
ww_name 0x5005076300410803 World Wide Name False
new_name New Logical Name True

1.3)如果驱动器上没有WWN标签,或复杂的SAN环境,或使用FC-SCSI-GATAWAY
的情况我们可以通过SAN交换机来确定,限于篇幅这里不做介绍。

2)参数:
3.1)显示现有参数的命令:
# lscfg -vl rmt1
DEVICE LOCATION DESCRIPTION
rmt7 30-68-01 IBM 3580 Ultrium Tape Drive (FCP)
Manufacturer................IBM
Machine Type and Model......ULT3580-TD1
Serial Number...............6811288675
Device Specific.(FW)........25D4

#lsattr -El rmt2
block_size 0 Block Size (0=Variable Length) True
compress yes Use Hardware Compression on Tape True
autoload no Use Autoloading Feature at End-of-Tape True
logging no Activate volume information logging True
max_log_size 500 Maximum size of log file (in # of entries) True
space_mode SCSI Backward Space/Forward Space Record Mode True
rew_immediate no Use Immediate Bit in Rewind Commands True
trailer_labels no Trailer Label Processing True
retain_reserve no Retain Reservation False
devtype ULT3580- Device Type False
scsi_id 0x213ca SCSI Target ID True
lun_id 0x0 Logical Unit Number True
location Location True
ww_name 0x5005076300410803 World Wide Name False
new_name New Logical Name True

3.2)设置参数的方法:
我们可以使用SMIT工具修改某一个指定的LTO设备。
具体方法是:
3.2.1)#SMITTY
3.2.2)选择菜单Devices -> Tape Drive -> Change/Show
Characteristics of a Tape Drive.
3.2.3)选择我们指定的设备
3.2.4)修改参数:
Change / Show Characteristics of a Tape Drive
Type or select values in entry fields.
Press Enter AFTER making all desired changes.

[Entry Fields]
Tape Drive rmt0
Tape Drive type 3580
Tape Drive interface scsi
Description IBM 3580 Ultrium Tape
Status Available
Location 14-08-00-0,0
Parent adapter scsi1
Connection address 0,0
Block Size (0=Variable Length) [0]
Use Hardware Compression on Tape yes
Activate volume information logging no
Maximum size of log file (in # of entries) [500]
Backward Space/Forward Space Record Mode SCSI
Use Immediate Bit in Rewind Commands no
Trailer Label Processing no

比如我们可以修改不使用硬件压缩
Use Hardware Compression on Tape no

这种修改是永久生效的。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多