path: root/rpc/glfs-operations.c
diff options
authorPrasanna Kumar Kalever <>2017-04-17 17:41:02 +0530
committerPrasanna Kumar Kalever <>2017-05-04 14:16:22 +0000
commita31ee2d59d59c74e2a1b91dc40cd12b7c918a45c (patch)
tree24da6a6ab150feaf24898d2f1f248ca6b960db74 /rpc/glfs-operations.c
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 <>
Diffstat (limited to 'rpc/glfs-operations.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/glfs-operations.c b/rpc/glfs-operations.c
index 71dd0d2..c7d38c4 100644
--- a/rpc/glfs-operations.c
+++ b/rpc/glfs-operations.c
@@ -351,8 +351,8 @@ blockGetMetaInfo(struct glfs* glfs, char* metafile, MetaInfo *info,
if (errCode) {
*errCode = errno;
- LOG("gfapi", GB_LOG_ERROR, "glfs_open(%s) on volume %s failed[%s]",
- metafile, info->volume, strerror(errno));
+ LOG("gfapi", GB_LOG_ERROR, "glfs_open(%s) failed[%s]", metafile,
+ strerror(errno));
ret = -1;
goto out;