diff options
author | Venky Shankar <vshankar@redhat.com> | 2015-03-13 22:00:22 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-03-24 10:26:15 -0700 |
commit | 31f841d6b35c242942b6bdcbfdc83cf548d5235a (patch) | |
tree | 450558d7e4b1788bb254b2117fef8cdc9b6f2033 /xlators/mgmt/glusterd/src/glusterd.c | |
parent | 84db9f8271f150fbb6024186f7f681e941731280 (diff) |
cli/glusterd: CLI interface for BitRot detection
* BitRot enable/disable CLI per volume
* Volfile generation for Scrubber
* Relevant glusterd infrastructure
Change-Id: I1212af63f93ecc52b22ee6da920e1664f66a1e39
BUG: 1170075
Original-Author: Raghavendra Bhat <raghavendra@redhat.com>
Original-Author: Venky Shankar <vshankar@redhat.com>
Original-Author: Gaurav Kumar Garg <ggarg@redhat.com>
Original-Author: Anand Nekkunti <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/9986
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 223ee98d0a4..6f37338ee09 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -42,6 +42,7 @@ #include "glusterd-shd-svc.h" #include "glusterd-nfs-svc.h" #include "glusterd-bitd-svc.h" +#include "glusterd-scrub-svc.h" #include "glusterd-quotad-svc.h" #include "glusterd-snapd-svc.h" #include "common-utils.h" @@ -1228,6 +1229,13 @@ glusterd_svc_init_all () } gf_log (THIS->name, GF_LOG_DEBUG, "BitD service initialized"); + ret = glusterd_scrubsvc_init (&(priv->scrub_svc)); + if (ret) { + gf_log (THIS->name, GF_LOG_ERROR, "Failed to initialized scrub " + "service"); + goto out; + } + gf_log (THIS->name, GF_LOG_DEBUG, "scrub service initialized"); out: return ret; @@ -1397,6 +1405,15 @@ init (xlator_t *this) exit (1); } + snprintf (storedir, PATH_MAX, "%s/scrub", workdir); + ret = mkdir (storedir, 0777); + if ((-1 == ret) && (errno != EEXIST)) { + gf_log (this->name, GF_LOG_CRITICAL, + "Unable to create scrub directory %s" + " ,errno = %d", storedir, errno); + exit (1); + } + snprintf (storedir, PATH_MAX, "%s/glustershd", workdir); ret = mkdir (storedir, 0777); if ((-1 == ret) && (errno != EEXIST)) { |