How to connect SAN from CentOS through two iSCSI Targets

Posted by garconcn on Server Fault See other posts from Server Fault or by garconcn
Published on 2011-11-29T20:35:07Z Indexed on 2013/10/22 21:56 UTC
Read the original article Hit count: 542

Filed under:
|
|
  • I had asked the similar question before. This time I want to use subnet for two iSCSI Targets, hence I start a new question.

I have an old Promise VTrak M500i SAN Server. It comes with 2 iSCSI ports. I want to connect to two LUNs on the SAN server through two separate Targets from CentOS 5.7 64bits server.

My network setup is as follows:

CentOS server:

Management network       -    192.168.1.1
Storage network 1        -    192.168.5.2
Storage network 2        -    192.168.6.2

Promise SAN server:

Management network       -    192.168.1.2
iSCSI Port 1             -    192.168.5.1
iSCSI Port 2             -    192.168.6.1 

I have two Logical Drives on this SAN and they are mapped as follows:

 Index  Initiator Name                LUN Mapping  
 0         iqn.2011-11:backup           (LD0,0)  
 1         iqn.2011-11:template         (LD1,1)  

Basically, I want

 the traffic to iqn.2011-11:backup LUN 0 through 192.168.5.1 network  
 the traffic to iqn.2011-11:template LUN 1 through 192.168.6.1 network  

I don't use MPIO, just want to separate the traffic to avoid traffic jam. How do I achieve this? I am new to SAN stuff, please explain as much detail as you can. Thank you.

The following are what I am doing now.

After mapping the LUN to my pre-defined Initiators, the CentOS server can discover both Targets.

[root@centos ~]# iscsiadm -m discovery -t sendtargets -p 192.168.5.1
192.168.5.1:3260,1 iscsi-1
192.168.6.1:3260,2 iscsi-1

[root@centos ~]# iscsiadm -m discovery -t sendtargets -p 192.168.6.1
192.168.6.1:3260,2 iscsi-1
192.168.5.1:3260,1 iscsi-1

[root@centos ~]# /etc/init.d/iscsi start

iscsid is stopped Starting iSCSI daemon: [ OK ]
[ OK ]
Setting up iSCSI targets:

Logging in to [iface: default, target: iscsi-1, portal: 192.168.6.1,3260]
Logging in to [iface: default, target: iscsi-1, portal: 192.168.5.1,3260]
Login to [iface: default, target: iscsi-1, portal: 192.168.6.1,3260] successful.
Login to [iface: default, target: iscsi-1, portal: 192.168.5.1,3260] successful.
[ OK ]

[root@centos ~]# iscsiadm -m session

tcp: [1] 192.168.6.1:3260,2 iscsi-1
tcp: [2] 192.168.5.1:3260,1 iscsi-1

When I check the LUN mapping on the SAN server for the two Logical Drives, both LUNs are connected through Port0-192.168.5.2 with the Initiator defined in CentOS.

Assigned Initiator List:

 Initiator Name     Alias                      IP Address          LUN  
 iqn.2011-11.centos  centos.mydomain.com    Port0-192.168.5.2   0  

 Initiator Name     Alias                      IP Address          LUN  
 iqn.2011-11.centos  centos.mydomain.com    Port1-192.168.5.2   1

I assume the following is what I want:

 Initiator Name     Alias                      IP Address          LUN  
 iqn.2011-11.backup   centos.mydomain.com   Port0-192.168.5.2   0

 Initiator Name     Alias                      IP Address          LUN  
 iqn.2011-11.template centos.mydomain.com   Port0-192.168.6.2   1

© Server Fault or respective owner

Related posts about iscsi

Related posts about target