From ddfef121a2254973ae72883112d1863052c6a580 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 29 Nov 2012 17:17:49 +0530 Subject: Add util function to kill brick Change-Id: Ic67edd7edeaab16461c0009b49d951bfb4d79929 BUG: 859927 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4270 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- tests/volume.rc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') diff --git a/tests/volume.rc b/tests/volume.rc index 26888741..32665467 100644 --- a/tests/volume.rc +++ b/tests/volume.rc @@ -60,3 +60,12 @@ function afr_child_up_status { function glustershd_up_status { gluster volume status | grep "Self-heal Daemon" | awk '{print $6}' } + +function kill_brick() +{ + vol=$1 + host=$2 + brick=$3 + brick_hiphenated=$(echo $brick | tr '/' '-') + kill -9 `cat /var/lib/glusterd/vols/$vol/run/${host}${brick_hiphenated}.pid` +} -- cgit