summaryrefslogtreecommitdiffstats
path: root/dvm/2298/testcase
blob: 090e006eabbce066276613af4fe3a5156d5b7ea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

function _init ()
{
    source $cwd/regression_helpers;
}

function remove_brick ()
{
    $GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;

    $GLUSTERFSDIR/gluster --mode=script volume remove-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export1 $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;

    $GLUSTERFSDIR/gluster volume info | grep "export1" 2>/dev/null 1>/dev/null;

    ret=$?;
    return $ret;
}

function main ()
{
    remove_brick;
    op_ret=$?;
    exit $op_ret;
}

_init && main "$@"