summaryrefslogtreecommitdiffstats
path: root/rpc/rpcl
diff options
context:
space:
mode:
authorPrasanna Kumar Kalever <prasanna.kalever@redhat.com>2017-04-17 17:41:02 +0530
committerPrasanna Kumar Kalever <pkalever@redhat.com>2017-05-04 14:16:22 +0000
commita31ee2d59d59c74e2a1b91dc40cd12b7c918a45c (patch)
tree24da6a6ab150feaf24898d2f1f248ca6b960db74 /rpc/rpcl
parent5d48aba7b65dfad09bfc639e3434f03227b8bd50 (diff)
login: one command for logging-in to all gateways of a target
Currently from the initiator side we need to login to mpath no. of nodes individually for establishing connect with all multipathed block devices from the client side, thus we need to execute mpath no. of login commands (i.e. login to each server) This can be minimized to single login command per target by configuring all gateways for a particular target in all gateways. Currently, $ gluster-block create VOL/BLOCK ha 3 HOSTx,HOSTy,HOSTz 10GiB Creates only one TPG i.e tpg1 (Read as Target Portal Group with Tag 1) on each node/server, with one portal listening on respective IP. All the gateways/nodes emulate same backend as target LUN with same WWN (for multipath representation) So at client side. we need to execute 3 commands to login all gateways $ iscsiadm -m discovery -t st -p HOSTy -l $ iscsiadm -m discovery -t st -p HOSTz -l $ iscsiadm -m discovery -t st -p HOSTx -l In the above case, user may login in any fashion, which is out of our control. Since we have failover multipath configuration, at a given time only one gateway can TX RX the data. so predicting active path/connection is not possible. With this patch, $ gluster-block create VOL/BLOCK ha 3 HOSTx,HOSTy,HOSTz 10GiB Creates 3 TPG's, tpg1(portal HOSTx), tpg2(portal HOSTy) and tpg3(portal HOSTz) on all the three gateways/nodes (IN same order). Basically, each gateway is define to every other gateway - but the other (other than local) gateway entries are in a disabled state. When the client starts the login sequence it issues the RPTG to the one nodes, but now that node can respond with portal IP's for all of the gateways. e.g. GW1 GW2 GW3 - tpg1/enabled - tpg1/disabled - tpg1/disabled - tpg2/disabled - tpg2/enabled - tpg2/disabled - tpg3/disabled - tpg3/disabled - tpg3/enabled Advantage, * Only one login command is needed, unlike 3 login's before, $ iscsiadm -m discovery -t st -p ANYONEHOST -l * Always tpg1 will be tried for making an active path/connection, hence we can predict that the first host in the list {HOSTx,HOSTy,HOSTz} will be tried for active connection. Hence we can be able to better manage load on each nodes, by selectively supplying Hosts in the list. Change-Id: I70f73b1d46812cb1bd8dc80f771ec20b0f0415bf Fixes: #9 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Diffstat (limited to 'rpc/rpcl')
-rw-r--r--rpc/rpcl/block.x1
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/rpcl/block.x b/rpc/rpcl/block.x
index ddf381d..f5e2b8b 100644
--- a/rpc/rpcl/block.x
+++ b/rpc/rpcl/block.x
@@ -21,6 +21,7 @@ struct blockCreate {
char passwd[127]; /* uuid */
u_quad_t size;
char block_name[255];
+ string block_hosts<>; /* for multiple tpg's creation */
bool auth_mode;
};