From 0b3e4130b576c11156d6327e4cc3c9310a74c143 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Fri, 5 Aug 2016 09:03:22 +0530 Subject: feature/bitrot: Ondemand scrub option for bitrot The bitrot scrubber takes 'hourly/daily/biweekly/monthly' as the values for 'scrub-frequency'. There is no way to schedule the scrubbing when the admin wants it. Ondemand scrubbing brings in the new option 'ondemand' with which the admin can start scrubbing ondemand. It starts the scrubbing immediately. Ondemand scrubbing is successful only if the scrubber is in 'Active (Idle)' (waiting for it's next frequency cycle to start scrubbing). It is not entertained when the scrubber is in 'Paused' or already running. Here is the command line syntax. gluster volume bitrot scrub ondemand Change-Id: I84c28904367eed827a7dae8d6a535c14b28e9f4d BUG: 1366195 Signed-off-by: Kotresh HR Reviewed-on: http://review.gluster.org/15111 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Venky Shankar --- tests/volume.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/volume.rc') diff --git a/tests/volume.rc b/tests/volume.rc index cb63e327f9e..1b62c026a28 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -597,6 +597,12 @@ else fi } +function check_for_xattr { + local xattr=$1 + local filepath=$2 + getfattr -n $xattr $filepath 2>/dev/null | grep "$xattr" | cut -f1 -d'=' +} + function get_bitd_count { ps auxww | grep glusterfs | grep bitd.pid | grep -v grep | wc -l } -- cgit