summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-05-05 16:50:18 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-05 06:14:58 -0700
commit4ec3c04a43b89fc76c8919aadfe28fb0b8990cd0 (patch)
treeee5961311170ae16801184455807009aa71e9013 /xlators
parent530a44a7c936dca76bda30bd40abdcc47c21fa7f (diff)
mgmt/glusterd: allow volume start force
Change-Id: If920bf0bf96b61b39bccbb10e66f5f39a55967f5 BUG: 812214 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3279 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 2b89a69d683..0f77350c181 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4428,7 +4428,8 @@ check_xattr:
/* This 'key' is set when the volume is started for the first time */
ret = sys_lgetxattr (path, "trusted.glusterfs.volume-id",
old_uuid, 16);
- if (ret >= 0) {
+ if ((ret >= 0 && ret != 16) || ((ret == 16) &&
+ uuid_compare (old_uuid, uuid))) {
snprintf (msg, sizeof (msg), "'%s:%s' has been part of "
"a volume with id %s. Please re-create the brick "
"directory.", host, path, uuid_utoa (old_uuid));