diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-replace-brick.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-replace-brick.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c index f84dae174..060d40bed 100644 --- a/xlators/mgmt/glusterd/src/glusterd-replace-brick.c +++ b/xlators/mgmt/glusterd/src/glusterd-replace-brick.c @@ -237,6 +237,7 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr, glusterd_peerinfo_t *peerinfo = NULL; glusterd_brickinfo_t *dst_brickinfo = NULL; gf_boolean_t is_run = _gf_false; + dict_t *ctx = NULL; ret = dict_get_str (dict, "src-brick", &src_brick); @@ -382,6 +383,20 @@ glusterd_op_stage_replace_brick (dict_t *dict, char **op_errstr, goto out; } + ctx = glusterd_op_get_ctx(); + if (ctx) { + if (!glusterd_is_fuse_available ()) { + gf_log ("glusterd", GF_LOG_ERROR, "Unable to open /dev/" + "fuse (%s), replace-brick command failed", + strerror (errno)); + snprintf (msg, sizeof(msg), "Fuse unavailable\n " + "Replace-brick failed"); + *op_errstr = gf_strdup (msg); + ret = -1; + goto out; + } + } + if (!glusterd_is_local_addr (src_brickinfo->hostname)) { gf_log ("", GF_LOG_DEBUG, "I AM THE SOURCE HOST"); |