김준성 <joonsung90 <at> gmail.com> writes: > > Hi. > > I want to setup iSCSI targets which have different IP addresses. > More detail, I want to make a specific node which handles all > discovery requests from clients. > My scenario is as follow. > > (1) The storage server has multiple storage nodes and each node has a > different IP address. Each storage node exports many iSCSI targets. > <node1>: 10.0.0.11 > 1st_target_in_node_1, (portal: 10.0.0.11:3333) <for client 1> > 2st_target_in_node_1, (portal: 10.0.0.11:3334) <for client 2> > 3st_target_in_node_1, (portal: 10.0.0.11:3335) <for client 3> > <node2>: 10.0.0.12 > 1st_target_in_node_2, (portal: 10.0.0.12:3333) <for client 1> > <node3>: 10.0.0.13 > 1st_target_in_node_3, (portal: 10.0.0.13:3333) <for client 2> > 2st_target_in_node_3, (portal: 10.0.0.13:3334) <for client 3> > ... > > (2) Multiple clients try to discovery available iSCSI targets by using > a single portal. > 10.0.0.10 is an alias IP address. Let's assume <node1>:10.0.0.11 has > this alias IP address. > [Client1] iscsiadm -m discovery -t st -P 10.0.0.10 > 1st_target_in_node_1, (portal: 10.0.0.11:3333) <for client 1> > 1st_target_in_node_2, (portal: 10.0.0.12:3333) <for client 1> > [Client2] iscsiadm -m discovery -t st -P 10.0.0.10 > 2st_target_in_node_1, (portal: 10.0.0.11:3334) <for client 2> > 1st_target_in_node_3, (portal: 10.0.0.13:3333) <for client 2> > [Client2] iscsiadm -m discovery -t st -P 10.0.0.10 > 3st_target_in_node_1, (portal: 10.0.0.11:3335) <for client 3> > 2st_target_in_node_3, (portal: 10.0.0.13:3334) <for client 3> > > In this scenario, I try to use open source tools (tgtd, targetcli) to > setup iSCSI targets with different portals. But I cannot. > For example, when I use tgtd > > root <at> host# tgtadm --lld iscsi --op new --mode portal --param portal=10.0.2.1 > tgtadm: invalid request > > It looks like tgtd and targetcli do not support remote IP addresses > (which are not in the local machine) for portals. > > In summary, my questions are. > (1) Do tgtd and targetcli support remote IP addresses for portals? If > it supports, how can I do that? > (2) To achieve the goal, should I make a specific proxy server to > handle discovery requests from clients? (constructing own iSCSI target > mapping (iSCSI target <-> node IP address), parsing iSCSI requests, > determining the discovery commands, and replying back to the client) > > Sincerely, > Joonsung Kim. > Hi. I found an alternative solution and I have a question related to the solution. iSCSI target daemon supports "target redirection". By using it, you can redirect all requests of "Normal" session type. You can setup redirection by following commands. ./tgtadm --op update --mode target --tid 1 --name RedirectAddress --value 10.0.2.1 ./tgtadm --op update --mode target --tid 1 --name RedirectPort --value 3260 ./tgtadm --op update --mode target --tid 1 --name RedirectReason --value Temporary (now, all reqeusts to the target (ID: 1) will be redirected into "10.0.2.1:3260") However, this approach cannot solve the question because it cannot show target iSCSI portal address to a client when the client accesses the target via "discovery" requests. For example, after you update the redirection property on the target, you can still get the same result from discovery requests. ===== before ==== root@snode-r02-05:~# iscsiadm -m discovery -t st -p 10.0.2.4 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935a 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935b 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935c ===== after update redirection on the target (TID: 1, original -> 10.0.2.1:3260) ==== root@snode-r02-05:~# iscsiadm -m discovery -t st -p 10.0.2.4 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935a 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935b 10.0.2.4:3260,1 iqn.2003-01.org.linux-iscsi.snode-r02- 04.x86:sn.fa8933c0935c In summary, (1) You can use "redirection" to achieve the partial purpose. (Just redirecting) (2) But you cannot solve "discovery issue". P.S. I have a question related to the alternative solution. iSCSI redirect features have a bad effect on the overall performance? (e.g., it might be occurring a bottleneck on the main iSCSI target portal.) Sincerely, Joonsung Kim.��.n��������+%������w��{.n����j�����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��