3 # Copyright (C) 2000-2017 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
6 # Test of aligned volumes. It does not require running on
7 # a ZFS filesystem, but attempts to reproduce a condition
8 # where the volume and catalog sizes do not agree, and
9 # when Bacula fixes it another number of Files error occurs
10 # causing the second job to fail.
12 TestName="aligned-bug-8013-test"
16 if test x$FORCE_CLOUD = xyes ; then
17 echo "\n=== Test $TestName skipped not compatible with Cloud ==="
22 scripts/copy-test-confs
23 cp scripts/aligned-bacula-sd.conf bin/bacula-sd.conf
25 # install the aligned volume plugin
26 #make -C build/src/plugins/sd install-aligned-plugin >/dev/null
28 echo "${cwd}/build" >${cwd}/tmp/file-list
32 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
35 @$out ${cwd}/tmp/log1.out
36 label storage=File volume=Vol1
37 label storage=File volume=Vol2
38 label storage=File volume=Vol3
39 label storage=File volume=Vol4
40 label storage=File volume=Vol5
41 update volume=Vol1 maxvolbytes=60M
42 update volume=Vol2 maxvolbytes=60M
43 update volume=Vol3 maxvolbytes=60M
44 update volume=Vol4 maxvolbytes=60M
45 @# Leave Vol5 with no size limit
51 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
54 @$out ${cwd}/tmp/log1.out
55 setdebug level=0 hangup=100 client
56 run job=$JobName level=Full yes
57 setdebug level=0 hangup=0 client
60 update volume=Vol1 volstatus="Append"
62 update Media SET VolFiles=2,VolBytes=100,VolABytes=100 WHERE VolumeName='Vol1';
64 setdebug level=15 storage=File
69 for i in 1 2 3 4 5 ; do
70 if test "$debug" -eq 1 ; then
74 if test "$debug" -eq 1 ; then
80 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
83 @$out ${cwd}/tmp/log1.out
84 setdebug level=0 hangup=0 client
85 run job=$JobName level=Full yes
91 for i in 6 7 8 9 10; do
92 if test "$debug" -eq 1 ; then
96 if test "$debug" -eq 1 ; then
102 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
106 @$out ${cwd}/tmp/log2.out
107 @# setdebug level=0 fd
108 restore where=${cwd}/tmp/bacula-restores storage=File
120 if test "$debug" -eq 1 ; then
126 check_for_zombie_jobs storage=File