From 164a8dda2cbf10862483e0333ebf7e727fc87f07 Mon Sep 17 00:00:00 2001 From: Gaurav Kumar Garg Date: Fri, 20 Nov 2015 14:00:38 +0530 Subject: glusterd: cli command implementation for bitrot scrub status This patch is backport of: http://review.gluster.org/10231 CLI command for bitrot scrub status will be : gluster volume bitrot scrub status Above command will show the statistics of bitrot scrubber. Upon execution of this command it will show some common scrubber tunable value of volume followed by statistics of scrubber statistics of individual nodes. sample ouput for single node: Volume name : State of scrub: Active Scrub frequency: biweekly Bitrot error log location: /var/log/glusterfs/bitd.log Scrubber error log location: /var/log/glusterfs/scrub.log ========================================================= Node name: Number of Scrubbed files: Number of Unsigned files: Last completed scrub time: Duration of last scrub: Error count: ========================================================= This is just infrastructure. list of bad file, last scrub time, error count value will be taken care by http://review.gluster.org/#/c/12503/ and http://review.gluster.org/#/c/12654/ patches. >> Change-Id: I3ed3c7057c9d0c894233f4079a7f185d90c202d1 >> BUG: 1207627 >> Signed-off-by: Gaurav Kumar Garg >> Reviewed-on: http://review.gluster.org/10231 >> Reviewed-by: Atin Mukherjee >> Tested-by: NetBSD Build System >> Tested-by: Gluster Build System Change-Id: I45ed94e5e0e78a1e007c30eb0b252f74cf3c9187 BUG: 1283881 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/12704 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Atin Mukherjee --- libglusterfs/src/globals.h | 4 +++- libglusterfs/src/glusterfs.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/globals.h b/libglusterfs/src/globals.h index 6983837d6e6..be6a06bbafb 100644 --- a/libglusterfs/src/globals.h +++ b/libglusterfs/src/globals.h @@ -37,7 +37,7 @@ */ #define GD_OP_VERSION_MIN 1 /* MIN is the fresh start op-version, mostly should not change */ -#define GD_OP_VERSION_MAX GD_OP_VERSION_3_7_6 /* MAX VERSION is the maximum +#define GD_OP_VERSION_MAX GD_OP_VERSION_3_7_7 /* MAX VERSION is the maximum count in VME table, should keep changing with introduction of newer @@ -59,6 +59,8 @@ #define GD_OP_VERSION_3_7_6 30706 /* Op-version for GlusterFS 3.7.6 */ +#define GD_OP_VERSION_3_7_7 30707 /* Op-version for GlusterFS 3.7.7 */ + #define GD_OP_VER_PERSISTENT_AFR_XATTRS GD_OP_VERSION_3_6_0 #include "xlator.h" diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index a3028522aaa..1988c33d6c4 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -621,6 +621,7 @@ typedef enum { GF_EVENT_PARENT_DOWN, GF_EVENT_VOLUME_BARRIER_OP, GF_EVENT_UPCALL, + GF_EVENT_SCRUB_STATUS, GF_EVENT_MAXVAL, } glusterfs_event_t; -- cgit