summaryrefslogtreecommitdiffstats
path: root/tests/basic/afr/arbiter-statfs.t
blob: 61cb9e1d04fedb873a83c7ba3f667e55677d6c65 (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
38
39
40
41
#!/bin/bash
#Test that statfs is not served from the arbiter brick.

. $(dirname $0)/../../include.rc
. $(dirname $0)/../../volume.rc

cleanup;
EXIT_EARLY=1
TEST glusterd

#Create brick partitions
TEST truncate -s 1G $B0/brick1
TEST truncate -s 1G $B0/brick2
#Arbiter brick is of a lesser size.
TEST truncate -s 90M $B0/brick3
LO1=`SETUP_LOOP $B0/brick1`
TEST [ $? -eq 0 ]
TEST MKFS_LOOP $LO1
LO2=`SETUP_LOOP $B0/brick2`
TEST [ $? -eq 0 ]
TEST MKFS_LOOP $LO2
LO3=`SETUP_LOOP $B0/brick3`
TEST [ $? -eq 0 ]
TEST MKFS_LOOP $LO3
TEST mkdir -p $B0/${V0}1 $B0/${V0}2 $B0/${V0}3
TEST MOUNT_LOOP $LO1 $B0/${V0}1
TEST MOUNT_LOOP $LO2 $B0/${V0}2
TEST MOUNT_LOOP $LO3 $B0/${V0}3

TEST $CLI volume create $V0 replica 3 arbiter 1 $H0:$B0/${V0}{1,2,3};
TEST $CLI volume start $V0
TEST $GFS --volfile-server=$H0 --volfile-id=$V0 $M0
free_space=$(df -P $M0 | tail -1 | awk '{ print $4}')
TEST [ $free_space -gt 100000 ]
TEST force_umount $M0
TEST $CLI volume stop $V0
EXPECT 'Stopped' volinfo_field $V0 'Status';
TEST $CLI volume delete $V0;
UMOUNT_LOOP ${B0}/${V0}{1,2,3}
rm -f ${B0}/brick{1,2,3}
cleanup;
a>Gluster Ant2018-09-121-405/+338 * coverity: libglusterfs issuesAmar Tumballi2018-08-191-0/+4 * All: run codespell on the code and fix issues.Yaniv Kaul2018-07-221-3/+3 * libglusterfs: Handle FS errors gracefullyPranith Kumar K2017-11-221-92/+157 * storage/posix: Adding implementation for posix_do_futimeskarthik-us2017-10-051-0/+7 * posix: fix incorrect xattr list handling on FreeBSDIblis Lin2017-08-291-2/+8 * posix: use nanosecond accuracy when availableNiklas Hambüchen2017-03-071-0/+10 * posix: Fix creation of files with S_ISVTX on FreeBSDXavier Hernandez2017-02-181-14/+33 * libglusterfs: fix statvfs in FreeBSDXavier Hernandez2017-01-101-1/+34 * core: use readdir(3) with glibc, and associated cleanupKaleb S. KEITHLEY2016-07-181-1/+18 * libglusterfs: Fix security prefix comparisonPranith Kumar K2016-05-041-1/+1 * build: reduce warnings when building the syscall compatibility layerNiels de Vos2016-04-251-1/+3 * experimental: add fdl (Full Data Logging) translatorJeff Darcy2016-02-131-1/+1 *