summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 385df1ea01b..45fb4c67e87 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -1282,7 +1282,8 @@ glusterd_brickinfo_new_from_brick (char *brick,
GD_MSG_BRICKINFO_CREATE_FAIL, "realpath"
" () failed for brick %s. The "
"underlying filesystem may be in bad "
- "state", new_brickinfo->path);
+ "state. Error - %s",
+ new_brickinfo->path, strerror(errno));
ret = -1;
goto out;
}
@@ -1358,6 +1359,12 @@ glusterd_is_brickpath_available (uuid_t uuid, char *path)
/* path may not yet exist */
if (!realpath (path, tmp_path)) {
if (errno != ENOENT) {
+ gf_msg (THIS->name, GF_LOG_CRITICAL, errno,
+ GD_MSG_BRICKINFO_CREATE_FAIL, "realpath"
+ " () failed for brick %s. The "
+ "underlying filesystem may be in bad "
+ "state. Error - %s",
+ path, strerror(errno));
goto out;
}
/* When realpath(3) fails, tmp_path is undefined. */
@@ -1369,8 +1376,14 @@ glusterd_is_brickpath_available (uuid_t uuid, char *path)
brick_list) {
if (gf_uuid_compare (uuid, brickinfo->uuid))
continue;
- if (_is_prefix (brickinfo->real_path, tmp_path))
+ if (_is_prefix (brickinfo->real_path, tmp_path)) {
+ gf_msg (THIS->name, GF_LOG_CRITICAL, 0,
+ GD_MSG_BRICKINFO_CREATE_FAIL,
+ "_is_prefix call failed for brick %s "
+ "against brick %s", tmp_path,
+ brickinfo->real_path);
goto out;
+ }
}
}
available = _gf_true;