summaryrefslogtreecommitdiffstats
path: root/xlators/mount/fuse/utils/mount.glusterfs.in
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mount/fuse/utils/mount.glusterfs.in')
-rwxr-xr-xxlators/mount/fuse/utils/mount.glusterfs.in22
1 files changed, 22 insertions, 0 deletions
diff --git a/xlators/mount/fuse/utils/mount.glusterfs.in b/xlators/mount/fuse/utils/mount.glusterfs.in
index a192d6059c5..bf89e9d528d 100755
--- a/xlators/mount/fuse/utils/mount.glusterfs.in
+++ b/xlators/mount/fuse/utils/mount.glusterfs.in
@@ -73,6 +73,19 @@ parse_backup_volfile_servers ()
echo ${new_servers}
}
+parse_backupvolfile_server ()
+{
+ local server=$1
+
+ length=$(echo $server | wc -c)
+ if [ ${length} -gt ${HOST_NAME_MAX} ]; then
+ echo "Hostname:${server} provided is too long.. exiting"
+ exit 1
+ fi
+
+ echo ${server}
+}
+
start_glusterfs ()
{
# lets the comparsion be case insensitive for all strings
@@ -207,6 +220,13 @@ start_glusterfs ()
cmd_line=$(echo "$cmd_line --volfile-server=$server_ip");
+ if [ -n "$backupvolfile_server" ]; then
+ if [ -z "$backup_volfile_servers" ]; then
+ server=$(parse_backupvolfile_server ${backupvolfile_server})
+ cmd_line=$(echo "$cmd_line --volfile-server=$server");
+ fi
+ fi
+
if [ -n "$backup_volfile_servers" ]; then
servers=$(parse_backup_volfile_servers ${backup_volfile_servers})
for i in $(echo ${servers}); do
@@ -388,6 +408,8 @@ main ()
"gid-timeout") gid_timeout=$value ;;
"background-qlen") bg_qlen=$value ;;
"backup-volfile-servers") backup_volfile_servers=$value ;;
+ ## Place-holder backward compatibility
+ "backupvolfile-server") backupvolfile_server=$value ;;
"congestion-threshold") cong_threshold=$value ;;
"xlator-option") xlator_option=$xlator_option" "$pair ;;
"fuse-mountopts") fuse_mountopts=$value ;;