Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1015318
  • 博文数量: 146
  • 博客积分: 3444
  • 博客等级: 中校
  • 技术积分: 1602
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-21 15:18
文章分类

全部博文(146)

文章存档

2014年(9)

2013年(3)

2012年(6)

2011年(44)

2010年(38)

2009年(46)

分类:

2010-02-03 10:33:16

aix中添加ISCSI硬盘
===========================================================
Iscsi协议是在以太网络上传输SCSI数据块的协议,一些存储厂商推出了基于ISCSI协议的存储产品,如NETAPP、EMC、IBM等。本文将以IBM 6000小型机 AIX系统通过Iscsi协议,连接ISCSI存储

1、 IBM从AIX 5200-03开始,在操作系统基本包中包含了iscsi的驱动程序,AIX一般已经安装了iscsi驱动
$ lslpp -L|grep -i iscs
devices.common.IBM.iscsi.rte
5.2.0.105 C F Common iSCSI Files
devices.iscsi.disk.rte 5.2.0.105 C F iSCSI Disk Software
devices.iscsi.tape.rte 5.2.0.0 C F iSCSI Tape Software
devices.iscsi_sw.rte 5.2.0.105 C F iSCSI Software Device Driver
2、需要将网络和iscsi存储相连,配置好本地ip,(xxx.xxx.xxx.xxx 为iscsi设备的业务ip)
配置target,具体的可以看文件中的说明
/etc/iscsi/targets
xxx.xxx.xxx.xxx port yyyyy
其中yyyyy 为目标存储的iscsi name 例iqn.2006-01.com.openfiler:home.is

3、配置好之后
cfgmgr -v –l iscsi0,没有错误的话可以找到新的硬盘
attempting to configure device 'iscsi0'
Time: 0 LEDS: 0x25b0
invoking /usr/lib/methods/cfgiscsi -l iscsi0
Number of running methods: 1
----------------
Completed method for: iscsi0, Elapsed time = 1
return code = 0
****************** stdout ***********
hdisk4
****************** no stderr ***********
----------------
Time: 1 LEDS: 0x539
Number of running methods: 0
----------------
attempting to configure device 'hdisk4'
Time: 1 LEDS: 0x25f3
invoking /usr/lib/methods/cfgscsidisk -l hdisk4
Number of running methods: 1
----------------
Completed method for: hdisk4, Elapsed time = 0
return code = 0
****************** no stdout ***********
****************** no stderr ***********
----------------
Time: 1 LEDS: 0x539
Number of running methods: 0
----------------
calling savebase
return code = 0
****************** no stdout ***********
****************** no stderr ***********
Configuration time: 1 seconds

4、lspv可列出新硬盘hdisk4

 

IBM官方回复的方法

在AIX连接iscsi设备的大概步骤如下:

1.首先确认iscsi设备是否存在,状态是否正常
# lsdev -C |grep iscsi
iscsi0 Available iSCSI Protocol Device
# lsattr -El iscsio
disc_filename /etc/iscsi/targets Configuration file False
disc_policy file Discovery Policy True
initiator_name iqn.aix61testos2.hostid.0a0a0a0d iSCSI Initiator Name True
isns_srvnames auto iSNS Servers IP Addresses True
isns_srvports iSNS Servers Port Numbers True
max_targets 16 Maximum Targets Allowed True
num_cmd_elems 200 Maximum number of commands to queue to driver True

2.修改/etc/iscsi/targets文件,按照如下格式加入server的信息
22.64.21.2 3260 iqn.1992-08.com.netapp:sn.101174332
IP,Port和iSCSI地址

3.识别iscsi设备
# cfgmgr -l iscsi0

4.上述步骤完成之后应该就可以看到磁盘了
# lsdev -Cc disk
...
hdisk2 Available Other iSCSI Disk Drive
hdisk3 Available Other iSCSI Disk Drive

如果使用lspv查看的时候,查不到PV号,则需要用
# chdev -l hdisk3 -a pv=yes 激活PV
 
然后使用smitty mkvg创建VG,然后使用smitty fs创建文件系统(在创建文件系统的时候已经指定了挂载点),然后使用 mount /挂载点名 手工mount一下文件系统。就可以使用了
 
如果不想让盘上的数据丢失,先使用importvg /y vg名 硬盘名 导入vg
然后smitty fs 挂载文件系统(此步也可以不需要)
然后mount /挂载点名 手工mount一下文件系统。就可以使用了
 
如果小机比存贮先启动,那么磁盘就不会被自动挂载上来,须使用如下步骤:
一、cfgmgr(这个执行成功的机会不大),cfgmgr -l iscsi0让机器寻找到设备
二、varyonvg datavg激活磁盘所在的vg
三、mount /wzdb2data 把文件系统mount上来
阅读(1858) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~