summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-cmd-volume.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c7
2 files changed, 15 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index 4e16ce1528f..bc292864cb0 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1112,6 +1112,7 @@ gf_cli_create_auxiliary_mount (char *volname)
char pidfile_path[PATH_MAX] = {0,};
char logfile[PATH_MAX] = {0,};
char qpid [16] = {0,};
+ char *sockpath = NULL;
GLUSTERFS_GET_AUX_MOUNT_PIDFILE (pidfile_path, volname);
@@ -1135,8 +1136,15 @@ gf_cli_create_auxiliary_mount (char *volname)
DEFAULT_LOG_FILE_DIRECTORY, volname);
snprintf(qpid, 15, "%d", GF_CLIENT_PID_QUOTA_MOUNT);
+ if (global_state->glusterd_sock) {
+ sockpath = global_state->glusterd_sock;
+ } else {
+ sockpath = DEFAULT_GLUSTERD_SOCKFILE;
+ }
+
ret = runcmd (SBIN_DIR"/glusterfs",
- "-s", "localhost",
+ "--volfile-server", sockpath,
+ "--volfile-server-transport", "unix",
"--volfile-id", volname,
"-l", logfile,
"-p", pidfile_path,
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index b8efcf12eeb..12198cc6cac 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -229,6 +229,7 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
char mountdir[] = "/tmp/mntXXXXXX";
char logfile[PATH_MAX] = {0,};
runner_t runner = {0};
+ char *volfileserver = NULL;
if (mkdtemp (mountdir) == NULL) {
gf_msg_debug ("glusterd", 0,
@@ -239,9 +240,13 @@ glusterd_quota_initiate_fs_crawl (glusterd_conf_t *priv, char *volname,
snprintf (logfile, sizeof (logfile),
DEFAULT_LOG_FILE_DIRECTORY"/%s-quota-crawl.log", volname);
+ if (dict_get_str (THIS->options, "transport.socket.bind-address",
+ &volfileserver) != 0)
+ volfileserver = "localhost";
+
runinit (&runner);
runner_add_args (&runner, SBIN_DIR"/glusterfs",
- "-s", "localhost",
+ "-s", volfileserver,
"--volfile-id", volname,
"--use-readdirp=no",
"--client-pid", QUOTA_CRAWL_PID,