From 5663ddee6c0bad1ae46bc1dc147f139d53d22763 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 9 Jun 2008 10:48:08 +0000 Subject: [PATCH] ebl update for faketape git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7118 91ce42f0-d328-0410-95d8-f526ca767f89 --- regress/scripts/bacula-dir-faketape.conf.in | 46 ++++++++++++++++--- regress/scripts/bacula-sd-faketape.conf.in | 40 +++++++++++++++- regress/scripts/cleanup-2drive.in | 8 ++-- regress/tests/faketape-test-changer | 51 +++++++++++++++++++-- 4 files changed, 128 insertions(+), 17 deletions(-) diff --git a/regress/scripts/bacula-dir-faketape.conf.in b/regress/scripts/bacula-dir-faketape.conf.in index 38d9763a1f..fb1f4011f1 100644 --- a/regress/scripts/bacula-dir-faketape.conf.in +++ b/regress/scripts/bacula-dir-faketape.conf.in @@ -9,7 +9,7 @@ Director { # define myself QueryFile = "@scriptdir@/query.sql" WorkingDirectory = "@working_dir@" PidDirectory = "@piddir@" - Maximum Concurrent Jobs = 4 + Maximum Concurrent Jobs = 40 Password = "pNvX1WiXnwv2C/F7E52LGvw6rKjbbPvu2kyuPa9pVaL3" Messages = Daemon } @@ -25,7 +25,7 @@ Job { Storage = LTO3 Messages = Standard Pool = Default - Maximum Concurrent Jobs = 4 + Maximum Concurrent Jobs = 10 SpoolData = yes # Prefer Mounted Volumes = no } @@ -38,8 +38,8 @@ Job { Storage = LTO1 Messages = Standard Pool = Default - Write Bootstrap = "@working_dir@/NightlySave.bsr" - Maximum Concurrent Jobs = 4 + Write Bootstrap = "@working_dir@/NightlySave1.bsr" + Maximum Concurrent Jobs = 10 SpoolData = yes # Prefer Mounted Volumes = no Client Run Before Job = "/bin/sleep 2" @@ -53,12 +53,25 @@ Job { Storage = LTO1 Messages = Standard Pool = Default - Write Bootstrap = "@working_dir@/NightlySave.bsr" - Maximum Concurrent Jobs = 4 + Write Bootstrap = "@working_dir@/NightlySave2.bsr" + Maximum Concurrent Jobs = 10 SpoolData = yes # Prefer Mounted Volumes = no } +Job { + Name = "NightlySave3" + Type = Backup + Client=@hostname@-fd + FileSet="Full Set" + Storage = LTO1 + Messages = Standard + Pool = Default + Write Bootstrap = "@working_dir@/NightlySave3.bsr" + Maximum Concurrent Jobs = 10 +# Prefer Mounted Volumes = no +} + Job { Name = "VerifyTape" Type = Verify @@ -256,6 +269,27 @@ Storage { Maximum Concurrent Jobs = 5 } +Storage { + Name = LTO1_5 + Address = @hostname@ + SDPort = @sdport@ + Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" + Device = LTO1_5 + Media Type = LTO1 + Autochanger = yes + Maximum Concurrent Jobs = 5 +} + +Storage { + Name = LTO1-ANSI_6 + Address = @hostname@ + SDPort = @sdport@ + Password = "ccV3lVTsQRsdIUGyab0N4sMDavui2hOBkmpBU0aQKOr9" + Device = LTO1-ANSI_6 + Media Type = LTO1-ANSI + Autochanger = yes + Maximum Concurrent Jobs = 5 +} # Definition of File storage device Storage { diff --git a/regress/scripts/bacula-sd-faketape.conf.in b/regress/scripts/bacula-sd-faketape.conf.in index 2215eac895..5e62ba65e4 100644 --- a/regress/scripts/bacula-sd-faketape.conf.in +++ b/regress/scripts/bacula-sd-faketape.conf.in @@ -28,8 +28,8 @@ Director { Autochanger { Name = LTO Changer Device = @working_dir@/ach/conf - Changer Command ="@scriptdir@/@changer_script@ %c %o %S %a %d" - Device = LTO3_0, LTO3_1, LTO3_2, LTO1_3, LTO1_4 + Changer Command ="@scriptdir@/disk-changer %c %o %S %a %d" + Device = LTO3_0, LTO3_1, LTO3_2, LTO1_5, LTO1_3, LTO1_4, LTO1-ANSI_6 } @@ -122,6 +122,42 @@ Device { Device Type = Tape } +Device { + Name = LTO1_5 + Media Type = LTO1 + Archive Device = @working_dir@/ach/drive5 + AutomaticMount = yes; # when device opened, read it + Autochanger = yes + Drive Index = 5 + AlwaysOpen = yes; + RemovableMedia = yes; + @@sbindir@/tape_options + Maximum File Size = 10M + Maximum Volume Size = 30M + Maximum Job Spool Size = 10M + Spool Directory = @working_dir@ + Device Type = Tape + Auto Select = no +} + +Device { + Name = LTO1-ANSI_6 + Media Type = LTO1-ANSI + Archive Device = @working_dir@/ach/drive6 + AutomaticMount = yes; # when device opened, read it + Autochanger = yes + Drive Index = 6 + AlwaysOpen = yes; + RemovableMedia = yes; + @@sbindir@/tape_options + Maximum File Size = 10M + Maximum Volume Size = 30M + Maximum Job Spool Size = 10M + Spool Directory = @working_dir@ + Device Type = Tape + Label Type = ansi +} + # # Send all messages to the Director, diff --git a/regress/scripts/cleanup-2drive.in b/regress/scripts/cleanup-2drive.in index a6c64911fe..c0eb660f64 100755 --- a/regress/scripts/cleanup-2drive.in +++ b/regress/scripts/cleanup-2drive.in @@ -25,8 +25,8 @@ if test x@autochanger@ != x/dev/null; then bin/@changer_script@ @autochanger@ load $SLOT2 @tape_drive1@ 1 fi echo "WEOF drive 1" - mt -f @tape_drive1@ rewind - mt -f @tape_drive1@ weof + init_drive @tape_drive1@ + echo "unload slot $SLOT2 in drive 1" bin/@changer_script@ @autochanger@ unload $SLOT2 @tape_drive1@ 1 @@ -37,8 +37,8 @@ if test x@autochanger@ != x/dev/null; then bin/@changer_script@ @autochanger@ load $SLOT1 @tape_drive@ 0 fi echo "WEOF drive 0" - mt -f @tape_drive@ rewind - mt -f @tape_drive@ weof + init_drive @tape_drive@ + echo "unload slot $SLOT1 from drive 0" bin/@changer_script@ @autochanger@ unload $SLOT1 @tape_drive@ 0 fi diff --git a/regress/tests/faketape-test-changer b/regress/tests/faketape-test-changer index 417e368efb..93496fc234 100755 --- a/regress/tests/faketape-test-changer +++ b/regress/tests/faketape-test-changer @@ -28,6 +28,8 @@ echo "${cwd}/build" >${cwd}/tmp/file-list start_test when1=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+30))"` +when2=`perl -MPOSIX -e "print strftime('%F %T', localtime(time+45))"` + clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir.conf` # Catalog record for cleaning tape "CLN01" successfully created. @@ -37,9 +39,11 @@ clientname=`awk '/Name = .*-fd/ { if (!ok) { print $3 ; ok=1 } }' bin/bacula-dir cat <${cwd}/tmp/bconcmds @output /dev/null messages -@$out ${cwd}/tmp/log1.out +@$out ${cwd}/tmp/log6.out @#setdebug level=200 storage=LTO1 -label barcodes pool=Scratch slots=1-40 storage=LTO1 drive=3 +label barcodes pool=Scratch slots=1-4 storage=LTO1-ANSI_6 drive=6 +yes +label barcodes pool=Scratch slots=5-40 storage=LTO1 drive=3 yes messages list volumes @@ -49,29 +53,66 @@ run_bacula stop_bacula cat <${cwd}/tmp/bconcmds -@$out ${cwd}/tmp/log2.out +@$out ${cwd}/tmp/log7.out label barcodes pool=Scratch slots=41-80 storage=LTO3 drive=0 yes messages list volumes -@$out ${cwd}/tmp/log3.out +@$out ${cwd}/tmp/log1.out run storage=LTO3 when="$when1" job=NightlySave pool=Inc yes run storage=LTO3 when="$when1" job=NightlySave2 pool=Full yes run storage=LTO3 when="$when1" job=NightlySave1 pool=Default yes + run storage=LTO1 when="$when1" job=NightlySave pool=Inc yes run storage=LTO1 when="$when1" job=NightlySave2 pool=Full yes run storage=LTO1 when="$when1" job=NightlySave1 pool=Default yes +run storage=LTO1 when="$when1" job=NightlySave3 pool=Diff yes + +run storage=LTO1-ANSI_6 when="$when2" job=NightlySave pool=Inc yes wait messages +quit END_OF_DATA run_bacula check_for_zombie_jobs storage=LTO1 $clientname check_for_zombie_jobs storage=LTO3 $clientname +check_for_zombie_jobs storage=LTO1-ANSI_6 client=$clientname + +touch ${cwd}/build/po/*.po + +cat <${cwd}/tmp/bconcmds +@$out ${cwd}/tmp/log2.out +run storage=LTO1-ANSI_6 job=NightlySave3 pool=Inc yes +wait +messages +@# +@# now do a restore +@# +restore fileset="Full Set" pool=Diff where=${cwd}/tmp/bacula-restores select all done +yes +wait +messages +wait +messages +END_OF_DATA +run_bconsole +check_for_zombie_jobs storage=LTO1 client=$clientname +check_for_zombie_jobs storage=LTO3 client=$clientname +check_for_zombie_jobs storage=LTO1-ANSI_6 client=$clientname stop_bacula -grep 'Error: Re-read' tmp/log3.out > /dev/null +check_two_logs +check_restore_diff + +grep LTO1_5 tmp/log1.out > /dev/null +if test $? = 0; then + echo "AutoSelect option broken" + bstat=1 +fi + +grep 'Error: Re-read' tmp/log1.out > /dev/null if test $? = 0; then echo "Found Re-read errors" bstat=1 -- 2.39.5