操作系统版本:
Red Hat Enterprise Linux Server release 6.8通过系统自带的iscsi 实现:
软件要求:
服务端:scsi-target-utils.x86_64
客户端:iscsi-initiator-utils.x86_64
测试环境地址配置情况:
eth0 pub 业务网络
eth1 pri 心跳网络
eth2 iscsi存储网络
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:e7:53:a6 brd ff:ff:ff:ff:ff:ff
inet 192.0.2.200/24 brd 192.0.2.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fee7:53a6/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:e7:53:b0 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.200/24 brd 10.0.2.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fee7:53b0/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:e7:53:ba brd ff:ff:ff:ff:ff:ff
inet 2.0.2.200/24 brd 2.0.2.255 scope global eth2
valid_lft forever preferred_lft forever
inet6 fe80::20c:29ff:fee7:53ba/64 scope link
valid_lft forever preferred_lft forever
ora01 主机 /dev/sdc1,通过iscsi 映射给ora02 主机。
主机ora01 配置:
[root@ora01 ~]# cat /etc/tgt/targets.conf
<target iqn.2019-05.disk.ora-san-net:ocr>
backing-store /dev/sdc1
initiator-address 2.0.2.202
</target>
[root@ora01 ~]# tgt-admin -s
Target 1: iqn.2019-05.disk.ora-san-net:ocr
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 2
Initiator: iqn.1988-12.com.oracle:9cd059a2d728
Connection: 0
IP Address: 2.0.2.202
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 1069 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdc1
Backing store flags:
Account information:
ACL information:
2.0.2.202
ora02 主机配置
[root@ora02 tgt]# chkconfig iscsid on
[root@ora02 tgt]# iscsiadm -m discovery -t sendtargets -p 2.0.2.200
[root@ora02 tgt]# iscsiadm -m node
[root@ora02 tgt]# iscsiadm -m node --login -T iqn.2019-05.disk.ora-san-net:ocr
[root@ora02 tgt]# iscsiadm -m session
环境检查,确认
ora01
[root@ora01 ~]# oracleasm querydisk /dev/sdc1
Device "/dev/sdc1" is marked an ASM disk with the label "DATA01"
ora02:
[root@ora02 tgt]# oracleasm querydisk /dev/sdf
Device "/dev/sdf" is marked an ASM disk with the label "DATA01"