blob: 8f08c78cd9bacbd7a99c6e6ff7bfc00dfb8e1af5 (
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
28
29
30
31
32
33
34
35
36
37
|
#!/bin/bash
function _init ()
{
source $cwd/regression_helpers;
}
function add_and_log ()
{
mkdir /tmp/logs_path;
$GLUSTERFSDIR/gluster volume create $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export 2>/dev/null 1>/dev/null;
#set the log file path for the volume
$GLUSTERFSDIR/gluster volume log filename $global_bug_id /tmp/logs_path 2>/dev/null 1>/dev/null;
$GLUSTERFSDIR/gluster volume start $global_bug_id 2>/dev/null 1>/dev/null;
$GLUSTERFSDIR/gluster volume add-brick $global_bug_id $(hostname):$EXPORT_DIR/$global_bug_id/export2 2>/dev/null 1>/dev/null;
#set the log file path for the newly added brick
$GLUSTERFSDIR/gluster volume log filename $global_bug_id $(hostname):$EXPOR_DIR/$global_bug_id/export2 /tmp/logs_path 2>/dev/null 1>/dev/null;
ls /tmp/logs_path | grep "export2" 2>/dev/null 1>/dev/null;
ret=$?;
rm -rf /tmp/logs_path 2>/dev/null 1>/dev/null;
return $ret;
}
function main ()
{
add_and_log;
op_ret=$?;
exit $op_ret;
}
_init && main "$@"
|