3
. $(dirname $0)/../include.rc
4
. $(dirname $0)/../nfs.rc
13
TEST $CLI volume create $V0 replica 2 $H0:$B0/${V0}{1,2,3,4};
16
TEST $CLI volume start $V0;
19
TEST $GFS -s $H0 --volfile-id $V0 --volume-name ${V0}-dht $M0;
21
TEST ! stat $M0/subdir1;
22
TEST mkdir $M0/subdir1;
23
TEST ! stat $M0/subdir2;
24
TEST mkdir $M0/subdir2;
25
TEST ! stat $M0/subdir1/subdir1.1;
26
TEST mkdir $M0/subdir1/subdir1.1;
27
TEST ! stat $M0/subdir1/subdir1.1/subdir1.2;
28
TEST mkdir $M0/subdir1/subdir1.1/subdir1.2;
31
TEST $GFS --subdir-mount /subdir1 -s $H0 --volfile-id $V0 --volume-name ${V0}-dht $M1;
33
TEST touch $M0/topfile;
34
TEST ! stat $M1/topfile;
36
TEST touch $M1/subdir1_file;
37
TEST ! stat $M0/subdir1_file;
38
TEST stat $M0/subdir1/subdir1_file;
41
TEST $GFS --subdir-mount /subdir2 -s $H0 --volfile-id $V0 $M2;
43
TEST ! stat $M2/topfile;
45
TEST touch $M2/subdir2_file;
46
TEST ! stat $M0/subdir2_file;
47
TEST ! stat $M1/subdir2_file;
48
TEST stat $M0/subdir2/subdir2_file;
59
TEST $GFS --subdir-mount /subdir1/subdir1.1/subdir1.2 -s $H0 --volfile-id $V0 $M2;
60
TEST ! stat $M2/topfile;
61
TEST touch $M2/subdir1.2_file;
62
TEST ! stat $M0/subdir1.2_file;
63
TEST stat $M0/subdir1/subdir1.1/subdir1.2/subdir1.2_file;
69
TEST $CLI volume set $V0 auth.allow 192.168.1.1
71
TEST $CLI volume set $V0 auth.allow "192.168.1.1,10.10.\*.\*,::1"
73
TEST $CLI volume set $V0 auth.allow "/subdir1\(1.2.3.4\),/\(192.168.10.2\|192.168.11.1\),/subdir2\(1.2.3.4\)"
76
TEST ! $CLI volume set $V0 auth.allow "subdir2\(1.2.3.4\)"
79
TEST $CLI volume set $V0 auth.allow '/subdir1/subdir1.1/subdir1.2/\(1.2.3.4\|::1\),/\(192.168.10.1\|192.168.11.1\),/subdir2\(1.2.3.4\)'
81
TEST $CLI volume stop $V0
83
TEST $CLI volume start $V0
85
TEST $GFS --subdir-mount /subdir1/subdir1.1/subdir1.2 -s $H0 --volfile-id $V0 $M2
88
initcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
90
TEST $CLI volume add-brick $V0 replica 2 $H0:$B0/${V0}{5,6};
93
newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
94
while [ $newcnt -eq $initcnt ]
96
newcnt=`grep -i create-subdir-mounts /var/log/glusterfs/glusterd.log | wc -l`
101
mount_inode=$(stat --format "%i" "$M2")
102
TEST test "$mount_inode" == "1"
108
TEST $GFS --subdir-mount /subdir2 -s $H0 --volfile-id $V0 $M2
109
mount_inode=$(stat --format "%i" "$M2")
110
TEST test "$mount_inode" == "1"
116
TEST $CLI volume stop $V0;
117
TEST $CLI volume delete $V0;
118
TEST ! $CLI volume info $V0;