1. 首页
  2. IT资讯

RedHat 5.4上iscsi+multipath多路径存储配置获取设备的wwid

最近在RedHat上搭建Oracle 11g r2 RAC,其中存储管理是采用iscsi+multipath的方式,所以将这部分的管理配置单独拿出来另写一篇,仅供参考。

概要
一:安装iscsi包。
二:启用iscsi设备。
:安装Multipath包。
:配置Multipath参数。
五:重启multipathd服务,验证配置

正文

一:安装iscsi包

安装scsi initiator包。安装包可从安装光盘中找到

[root@rac122 ~]# rpm -qa | grep iscsi iscsi-initiator-utils-6.2.0.871-0.10.el5

二:启用iscsi设备

新建接口文件,接口文件保存在/var/lib/iscsi/ifaces目录下:

[root@rac122 ~]# ls /var/lib/iscsi/ifaces bnx2i.00:00:00:00:00:00

[root@rac122 ~]# iscsiadm -m iface -I eth0 -o new New interface eth0 added [root@rac122 ~]# ls /var/lib/iscsi/ifaces bnx2i.00:00:00:00:00:00 eth0 [root@rac122 ~]# cat /var/lib/iscsi/ifaces/eth0 # BEGIN RECORD 2.0-871 iface.iscsi_ifacename = eth0 iface.transport_name = tcp # END RECORD [root@rac122 ~]# iscsiadm -m iface -I eth0 –op=update -n iface.net_ifacename -v eth0 eth0 updated. [root@rac122 ~]# cat /var/lib/iscsi/ifaces/eth0 # BEGIN RECORD 2.0-871 iface.iscsi_ifacename = eth0 iface.net_ifacename = eth0 iface.transport_name = tcp # END RECORD

建完接口文件重启iscsi服务

[root@rac122 ~]# service iscsi restart Stopping iSCSI daemon: iscsid dead but pid file exists [ OK ]off network shutdown. Starting iSCSI daemon: [ OK ] [ OK ] Setting up iSCSI targets: iscsiadm: No records found! [ OK ]

根据提供的IP收索iscsi target [root@rac122 ~]# iscsiadm -m discovery -t st -p 10.1.252.148:3260 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4

与搜素到的target建立连接

[root@rac122 ~]# iscsiadm -m node -l Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3, portal: 10.1.252.148,3260] Logging in to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4, portal: 10.1.252.148,3260] Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3, portal: 10.1.252.148,3260]: successful Login to [iface: eth0, target: iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4, portal: 10.1.252.148,3260]: successful

[root@rac122 ~]# iscsiadm -m session tcp: [1] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7 tcp: [2] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-495ed9007-b68000000ca4cc4d-vol-rac8 tcp: [3] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fdded9007-b80000000c44cb23-vol-rac6 tcp: [4] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-fc7ed9007-6b1000000c14cb23-vol-rac5 tcp: [5] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-668ed9007-1ca000000a34ca57-vol-rac2 tcp: [6] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-631ed9007-a93000000a04ca57-vol-rac1 tcp: [7] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-697ed9007-251000000a64ca57-vol-rac3 tcp: [8] 10.1.252.148:3260,1 iqn.2001-05.com.equallogic:0-8a0906-6b1ed9007-b7c000000a94ca57-vol-rac4

[root@rac122 ~]# iscsiadm -m session -P3 iSCSI Transport Class version 2.0-871 version 2.0-871 Target: iqn.2001-05.com.equallogic:0-8a0906-dcced9007-10d000000c74cc10-vol-rac7 Current Portal: 10.1.252.149:3260,1 Persistent Portal: 10.1.252.148:3260,1 ********** Interface: ********** Iface Name: eth0 Iface Transport: tcp Iface Initiatorname: iqn.1994-05.com.redhat:b9e5bb909ae1 Iface IPaddress: 10.1.252.122 Iface HWaddress: Iface Netdev: eth0 SID: 1 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE ************************ Negotiated iSCSI params: ************************ HeaderDigest: None DataDigest: None

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29578568/viewspace-2140483/,如需转载,请注明出处,否则将追究法律责任。

主题测试文章,只做测试使用。发布者:布吉卡,转转请注明出处:http://www.cxybcw.com/195372.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code