diff options
author | Avra Sengupta <asengupt@redhat.com> | 2015-07-05 12:21:31 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2015-07-06 22:55:48 -0700 |
commit | 0efffcdb4eccac48d9eac26d7715ce24493ed753 (patch) | |
tree | 4a30eb9564090e2114df5d29605f4f0494c1c6a8 /xlators/mgmt/glusterd/src/glusterd.c | |
parent | 1fceab7e54b4a7f18181ed6bbbdea065d402bff1 (diff) |
glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's brick
Backport of http://review.gluster.org/#/c/11533/
The brick path we use to create shared storage is
/var/run/gluster/ss_brick.
The problem with using this brick path is /var/run/gluster
is a tmpfs and all the brick/shared storage data will be wiped
off when the node restarts. Hence using /var/lib/glusterd/ss_brick
as the brick path for shared storage volume as this brick and
the shared storage volume is internally created by us (albeit on
user's request), and contains only internal state data and no user data.
Change-Id: I808d1aa3e204a5d2022086d23bdbfdd44a2cfb1c
BUG: 1230399
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11534
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 42037056263..9754e8bf874 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -68,7 +68,6 @@ extern struct rpc_clnt_program gd_brick_prog; extern struct rpcsvc_program glusterd_mgmt_hndsk_prog; extern char snap_mount_dir[PATH_MAX]; -char ss_brick_path[PATH_MAX]; rpcsvc_cbk_program_t glusterd_cbk_prog = { .progname = "Gluster Callback", @@ -1445,18 +1444,15 @@ init (xlator_t *this) snprintf (snap_mount_dir, sizeof(snap_mount_dir), "%s%s", var_run_dir, GLUSTERD_DEFAULT_SNAPS_BRICK_DIR); - ret = glusterd_init_var_run_dirs (this, var_run_dir, - GLUSTER_SHARED_STORAGE_BRICK_DIR); + ret = mkdir_p (GLUSTER_SHARED_STORAGE_BRICK_DIR, 0777, + _gf_true); if (ret) { gf_msg (this->name, GF_LOG_CRITICAL, 0, - GD_MSG_VAR_RUN_DIR_INIT_FAIL, "Unable to create " + GD_MSG_DIR_OP_FAILED, "Unable to create " "shared storage brick"); exit (1); } - snprintf (ss_brick_path, sizeof(ss_brick_path), "%s%s", - var_run_dir, GLUSTER_SHARED_STORAGE_BRICK_DIR); - snprintf (cmd_log_filename, PATH_MAX, "%s/cmd_history.log", DEFAULT_LOG_FILE_DIRECTORY); ret = gf_cmd_log_init (cmd_log_filename); |