3 # Run a job with a limited tape size so that the tape fills up.
4 # Then manually unload the tape and load a new one, label
7 TestName="two-vol-manual-tape"
8 JobName=twovolmanualtape
15 scripts/copy-tape-confs
16 echo "${cwd}/build" >${cwd}/tmp/file-list
18 change_jobname $JobName
21 # Write out bconsole commands
22 cat <<END_OF_DATA >tmp/bconcmds
26 label storage=DDS-4 volume=TestVolume001 slot=0 pool=Default drive=0
27 update Volume=TestVolume001 MaxVolBytes=4000000 pool=Default drive=0
29 select * from Storage;
30 select VolumeName,InChanger,StorageId from Media;
32 @#setdebug level=150 storage=DDS-4
34 @# This sleep must be long enough for the first tape to fill (4MB)
35 @# otherwise the following mtx-changer commands will fail
38 select * from Storage;
39 select VolumeName,InChanger,StorageId from Media;
51 mt -f ${TAPE_DRIVE} rewind
54 bin/mtx-changer ${AUTOCHANGER} unload $slot ${TAPE_DRIVE} $DRIVE1
55 bin/mtx-changer ${AUTOCHANGER} load $SLOT2 ${TAPE_DRIVE} $DRIVE1
58 bin/mtx-changer ${AUTOCHANGER} unload $slot ${TAPE_DRIVE} $DRIVE1
59 bin/mtx-changer ${AUTOCHANGER} load $SLOT1 ${TAPE_DRIVE} $DRIVE1
62 echo "Something went wrong. Expected $SLOT1 or $SLOT2, got $slot"
66 mt -f ${TAPE_DRIVE} rewind
67 mt -f ${TAPE_DRIVE} weof
69 # second half of job -- write on next tape
70 cat <<END_OF_DATA >tmp/bconcmds
72 label storage=DDS-4 volume=TestVolume002 slot=0 pool=Default drive=0
77 @#restore where=${cwd}/tmp/bacula-restores select all storage=DDS-4 done
91 check_for_zombie_jobs storage=DDS-4