From 26c2080dcfefda4fbdea6ab8917f734401c19e20 Mon Sep 17 00:00:00 2001 From: Dmitry Bashkatov Date: Wed, 11 Mar 2015 16:40:22 +0300 Subject: [PATCH] gluster_volume: use force option during add-brick --- system/gluster_volume.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/system/gluster_volume.py b/system/gluster_volume.py index 91a717aae6d..3f735a12e1a 100644 --- a/system/gluster_volume.py +++ b/system/gluster_volume.py @@ -262,8 +262,11 @@ def main(): def set_volume_option(name, option, parameter): run_gluster([ 'volume', 'set', name, option, parameter ]) - def add_brick(name, brick): - run_gluster([ 'volume', 'add-brick', name, brick ]) + def add_brick(name, brick, force): + args = [ 'volume', 'add-brick', name, brick ] + if force: + args.append('force') + run_gluster(args) def rebalance(name): run_gluster(['volume', 'rebalance', name, 'start']) @@ -363,7 +366,7 @@ def main(): removed_bricks.append(brick) for brick in new_bricks: - add_brick(volume_name, brick) + add_brick(volume_name, brick, force) changed = True # handle quotas