From 2e58513506919899115935c2ca6b2359fdeff7b8 Mon Sep 17 00:00:00 2001 From: Rajesh Joseph Date: Thu, 20 Feb 2014 19:22:23 +0530 Subject: gluster/snapshot: Create missing backend snapshot folder Snapshot volume bricks are mounted under /var/run/gluster/snaps folder. In the latest machines /var/run is a symbolic link to /run folder. In such cases if we use /var/run then there would be mismatch between mtab entry for the mount and the folder where we actually mount. Therefore this patch will get the correct folder and also create it if the folder is missing. Change-Id: I267aa7f3e171b486c5b3bb2a9f88cbd4be0e47ea BUG: 1072253 Signed-off-by: Rajesh Joseph Reviewed-on: http://review.gluster.org/7140 --- xlators/mgmt/glusterd/src/glusterd.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd.h') diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index bd765349a..8ba626183 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -437,14 +437,9 @@ enum glusterd_vol_comp_status_ { #define GLUSTERD_VOL_SNAP_DIR_PREFIX "snaps" #define GLUSTERD_VOL_SNAP_CG_DIR_PREFIX "cgs" -/* TODO: It was supposed to be /var/run/gluster. But /var/run seems - to be a symbolic link to /run/gluster which creates problems - as the entry point in the mtab for the mount point and - glusterd maintained entry point will be different. Verify - properly on which path should be used for creating the - brick directories of snap volumes -*/ -#define GLUSTERD_DEFAULT_SNAPS_BRICK_DIR "/run/gluster/snaps" +#define GLUSTERD_DEFAULT_SNAPS_BRICK_DIR "/gluster/snaps" +#define GLUSTERD_VAR_RUN_DIR "/var/run" +#define GLUSTERD_RUN_DIR "/run" /* definitions related to replace brick */ #define RB_CLIENT_MOUNTPOINT "rb_mount" -- cgit