From 00b4c62db3d17c47e672fdd5c49e9306d6c2de88 Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Wed, 19 Nov 2014 17:22:21 +0530 Subject: mount:Handle -o transport option in mount.glusterfs Backport of http://review.gluster.org/#/c/9147/ In current scenario ,when tcp transport type(default) specified for mounting,glusterfs mount script won't append '.tcp' to volume name.But to accommodate the change in http://review.gluster.org/#/c/9146/, we need to append ".tcp" with volfile-id if '-o transport=tcp' is given. Change-Id: I5444ac38846192de4af02535435b86bb00422aab BUG: 1166515 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/9179 Tested-by: Gluster Build System Reviewed-by: Raghavendra G Reviewed-by: Raghavendra Bhat --- xlators/mount/fuse/utils/mount.glusterfs.in | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'xlators') diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in index d491cc33c89..68d452c142e 100755 --- a/xlators/mount/fuse/utils/mount.glusterfs.in +++ b/xlators/mount/fuse/utils/mount.glusterfs.in @@ -232,9 +232,8 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --xlator-option=$xlator_option"); fi - # for rdma volume, we have to fetch volfile with '.rdma' added - # to volume name, so that it fetches the right client vol file - volume_id_rdma=""; + # if trasnport type is specified, we have to append it to + # volume name, so that it fetches the right client vol file if [ -z "$volfile_loc" ]; then if [ -n "$server_ip" ]; then @@ -272,16 +271,10 @@ start_glusterfs () cmd_line=$(echo "$cmd_line --volfile-server-port=$server_port"); fi - if [ -n "$transport" ]; then - cmd_line=$(echo "$cmd_line --volfile-server-transport=$transport"); - if [ "$transport" = "rdma" ]; then - volume_id_rdma=".rdma"; - fi - fi - if [ -n "$volume_id" ]; then - if [ -n "$volume_id_rdma" ]; then - volume_id="$volume_id$volume_id_rdma"; + if [ -n "$transport" ]; then + volume_id="$volume_id.$transport"; + cmd_line=$(echo "$cmd_line --volfile-server-transport=$transport"); fi cmd_line=$(echo "$cmd_line --volfile-id=$volume_id"); fi @@ -295,7 +288,6 @@ start_glusterfs () fi cmd_line=$(echo "$cmd_line $mount_point"); - $cmd_line; if [ $? -ne 0 ]; then warn "Mount failed. Please check the log file for more details." -- cgit