summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
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));