summaryrefslogtreecommitdiffstats
path: root/tests/bugs/replicate/bug-1561129-enospc.t
blob: 1b402fcc7812a1077624010e28ba519df23d7e97 (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
#!/bin/bash
#Tests that sequential write workload doesn't lead to FSYNCs

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

cleanup;

TEST truncate -s 128M $B0/xfs_image
TEST mkfs.xfs -f $B0/xfs_image
TEST mkdir $B0/bricks
TEST mount -t xfs -o loop $B0/xfs_image $B0/bricks

TEST glusterd
TEST pidof glusterd
TEST $CLI volume create $V0 replica 3 $H0:$B0/bricks/brick{0,1,3}
TEST $CLI volume start $V0
TEST $GFS --volfile-id=$V0 --volfile-server=$H0 $M0;

# Write 50MB of data, which will try to consume 50x3=150MB on $B0/bricks.
# Before that, we hit ENOSPC in pre-op cbk, which should not crash the mount.
TEST ! dd if=/dev/zero of=$M0/a bs=1M count=50
TEST stat $M0/a
cleanup;