From 37cc188cc9644a994970099cbb351b539e8edc17 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 15 Jul 2009 08:59:59 +0000 Subject: [PATCH] Add more example SD Device configurations git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@8998 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/examples/devices/DDS4.conf | 19 +++ bacula/examples/devices/DVD.conf | 22 +++ bacula/examples/devices/Exabyte.conf | 15 ++ bacula/examples/devices/FreeBSD.conf | 16 +++ bacula/examples/devices/LTO-2.conf | 20 +++ bacula/examples/devices/LTO-3.conf | 20 +++ bacula/examples/devices/LTO-4.conf | 20 +++ bacula/examples/devices/OnStream.conf | 19 +++ bacula/examples/devices/OpenBSD.conf | 14 ++ .../devices/two-drive-autoloader.conf | 48 +++++++ bacula/src/stored/bacula-sd.conf.in | 128 +++++++----------- bacula/technotes | 2 + 12 files changed, 267 insertions(+), 76 deletions(-) create mode 100644 bacula/examples/devices/DDS4.conf create mode 100644 bacula/examples/devices/DVD.conf create mode 100644 bacula/examples/devices/Exabyte.conf create mode 100644 bacula/examples/devices/FreeBSD.conf create mode 100644 bacula/examples/devices/LTO-2.conf create mode 100644 bacula/examples/devices/LTO-3.conf create mode 100644 bacula/examples/devices/LTO-4.conf create mode 100644 bacula/examples/devices/OnStream.conf create mode 100644 bacula/examples/devices/OpenBSD.conf create mode 100644 bacula/examples/devices/two-drive-autoloader.conf diff --git a/bacula/examples/devices/DDS4.conf b/bacula/examples/devices/DDS4.conf new file mode 100644 index 0000000000..07a5157268 --- /dev/null +++ b/bacula/examples/devices/DDS4.conf @@ -0,0 +1,19 @@ +# +# A Linux or Solaris tape drive +# +Device { + Name = DDS-4 # + Media Type = DDS-4 + Archive Device = @TAPEDRIVE@ + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; +# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +# Changer Device = /dev/sg0 +# AutoChanger = yes + # Enable the Alert command only if you have the mtx package loaded +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/DVD.conf b/bacula/examples/devices/DVD.conf new file mode 100644 index 0000000000..8c6552aa2e --- /dev/null +++ b/bacula/examples/devices/DVD.conf @@ -0,0 +1,22 @@ +# +# A DVD device +# +Device { + Name = "DVD Writer" + Media Type = DVD + Device Type = DVD + Archive Device = /dev/hdc + LabelMedia = yes; # lets Bacula label unlabeled media + Random Access = Yes; + AutomaticMount = yes; # when device opened, read it + RemovableMedia = yes; + AlwaysOpen = no; + MaximumPartSize = 800M; + RequiresMount = yes; + MountPoint = /mnt/cdrom; + MountCommand = "/bin/mount -t iso9660 -o ro %a %m"; + UnmountCommand = "/bin/umount %m"; + SpoolDirectory = /tmp/backup; + WritePartCommand = "@scriptdir@/dvd-handler %a write %e %v" + FreeSpaceCommand = "@scriptdir@/dvd-handler %a free" +} diff --git a/bacula/examples/devices/Exabyte.conf b/bacula/examples/devices/Exabyte.conf new file mode 100644 index 0000000000..bd8a8159ff --- /dev/null +++ b/bacula/examples/devices/Exabyte.conf @@ -0,0 +1,15 @@ +# +# A very old Exabyte with no end of media detection +# +Device { + Name = "Exabyte 8mm" + Media Type = "8mm" + Archive Device = @TAPEDRIVE@ + Hardware end of medium = No; + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = Yes; + RemovableMedia = yes; + RandomAccess = no; + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/FreeBSD.conf b/bacula/examples/devices/FreeBSD.conf new file mode 100644 index 0000000000..b545aabcef --- /dev/null +++ b/bacula/examples/devices/FreeBSD.conf @@ -0,0 +1,16 @@ +Device { + Name = DDS-4 + Description = "DDS-4 for FreeBSD" + Media Type = DDS-4 + Archive Device = /dev/nsa1 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes + Offline On Unmount = no + Hardware End of Medium = no + BSF at EOM = yes + Backward Space Record = no + Fast Forward Space File = no + TWO EOF = yes + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/LTO-2.conf b/bacula/examples/devices/LTO-2.conf new file mode 100644 index 0000000000..c956b0e20e --- /dev/null +++ b/bacula/examples/devices/LTO-2.conf @@ -0,0 +1,20 @@ +# +# A Linux or Solaris LTO-2 tape drive +# +Device { + Name = LTO-2 + Media Type = LTO-2 + Archive Device = @TAPEDRIVE@ + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + Maximum File Size = 3GB +# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +# Changer Device = /dev/sg0 +# AutoChanger = yes + # Enable the Alert command only if you have the mtx package loaded +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/LTO-3.conf b/bacula/examples/devices/LTO-3.conf new file mode 100644 index 0000000000..3fa8f83e8d --- /dev/null +++ b/bacula/examples/devices/LTO-3.conf @@ -0,0 +1,20 @@ +# +# A Linux or Solaris LTO-3 tape drive +# +Device { + Name = LTO-3 + Media Type = LTO-3 + Archive Device = @TAPEDRIVE@ + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + Maximum File Size = 4GB +# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +# Changer Device = /dev/sg0 +# AutoChanger = yes + # Enable the Alert command only if you have the mtx package loaded +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/LTO-4.conf b/bacula/examples/devices/LTO-4.conf new file mode 100644 index 0000000000..1b921e5fd6 --- /dev/null +++ b/bacula/examples/devices/LTO-4.conf @@ -0,0 +1,20 @@ +# +# A Linux or Solaris LTO-4 tape drive +# +Device { + Name = LTO-4 + Media Type = LTO-4 + Archive Device = @TAPEDRIVE@ + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + Maximum File Size = 5GB +# Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +# Changer Device = /dev/sg0 +# AutoChanger = yes + # Enable the Alert command only if you have the mtx package loaded +# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# If you have smartctl, enable this, it has more info than tapeinfo +# Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/OnStream.conf b/bacula/examples/devices/OnStream.conf new file mode 100644 index 0000000000..48ba3b4e30 --- /dev/null +++ b/bacula/examples/devices/OnStream.conf @@ -0,0 +1,19 @@ +# +# A OnStream tape drive. +# You need the kernel osst driver 0.9.14 or later, and +# do "mt -f /dev/nosst0 defblksize 32768" once as root. +# +Device { + Name = OnStream + Description = "OnStream drive on Linux" + Media Type = OnStream + Archive Device = @TAPEDRIVE@ + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes + Offline On Unmount = no +# The min/max blocksizes of 32768 are *required* + Minimum Block Size = 32768 + Maximum Block Size = 32768 + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/OpenBSD.conf b/bacula/examples/devices/OpenBSD.conf new file mode 100644 index 0000000000..88b71c6d3c --- /dev/null +++ b/bacula/examples/devices/OpenBSD.conf @@ -0,0 +1,14 @@ +Device { + Name = DDS-3 + Media Type = DDS-3 + Archive Device = /dev/nrst0 + Use MTIOCGET= no + BSF at EOM = yes + TWO EOF = no + AutomaticMount = yes; + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/examples/devices/two-drive-autoloader.conf b/bacula/examples/devices/two-drive-autoloader.conf new file mode 100644 index 0000000000..395531e8c3 --- /dev/null +++ b/bacula/examples/devices/two-drive-autoloader.conf @@ -0,0 +1,48 @@ +# +# An autochanger device with two drives +# +Autochanger { + Name = Autochanger + Device = Drive-1 + Device = Drive-2 + Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" + Changer Device = /dev/sg0 +} + +Device { + Name = Drive-1 # + Drive Index = 0 + Media Type = DLT-8000 + Archive Device = /dev/nst0 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + AutoChanger = yes + # + # Enable the Alert command only if you have the mtx package loaded + # Note, apparently on some systems, tapeinfo resets the SCSI controller + # thus if you turn this on, make sure it does not reset your SCSI + # controller. I have never had any problems, and smartctl does + # not seem to cause such problems. + # + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} + +Device { + Name = Drive-2 # + Drive Index = 1 + Media Type = DLT-8000 + Archive Device = /dev/nst1 + AutomaticMount = yes; # when device opened, read it + AlwaysOpen = yes; + RemovableMedia = yes; + RandomAccess = no; + AutoChanger = yes + # Enable the Alert command only if you have the mtx package loaded + Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" + If you have smartctl, enable this, it has more info than tapeinfo + Alert Command = "sh -c 'smartctl -H -l error %c'" +} diff --git a/bacula/src/stored/bacula-sd.conf.in b/bacula/src/stored/bacula-sd.conf.in index 576f488ccb..7537cff90a 100644 --- a/bacula/src/stored/bacula-sd.conf.in +++ b/bacula/src/stored/bacula-sd.conf.in @@ -36,6 +36,13 @@ Director { Monitor = yes } +# +# Note, for a list of additional Device templates please +# see the directory /examples/devices +# Or follow the following link: +# http://bacula.svn.sourceforge.net/viewvc/bacula/trunk/bacula/examples/devices/ +# + # # Devices supported by this Storage daemon # To connect, the Director's bacula-dir.conf must have the @@ -103,16 +110,17 @@ Device { #} # -# A Linux or Solaris tape drive +# A Linux or Solaris LTO-2 tape drive # #Device { -# Name = DDS-4 # -# Media Type = DDS-4 +# Name = LTO-2 +# Media Type = LTO-2 # Archive Device = @TAPEDRIVE@ # AutomaticMount = yes; # when device opened, read it # AlwaysOpen = yes; # RemovableMedia = yes; # RandomAccess = no; +# Maximum File Size = 3GB ## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" ## Changer Device = /dev/sg0 ## AutoChanger = yes @@ -123,98 +131,66 @@ Device { #} # -# A FreeBSD tape drive -# -#Device { -# Name = DDS-4 -# Description = "DDS-4 for FreeBSD" -# Media Type = DDS-4 -# Archive Device = /dev/nsa1 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes -# Offline On Unmount = no -# Hardware End of Medium = no -# BSF at EOM = yes -# Backward Space Record = no -# Fast Forward Space File = no -# TWO EOF = yes -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -# -# A OnStream tape drive. -# You need the kernel osst driver 0.9.14 or later, and -# do "mt -f /dev/nosst0 defblksize 32768" once as root. +# A Linux or Solaris LTO-3 tape drive # #Device { -# Name = OnStream -# Description = "OnStream drive on Linux" -# Media Type = OnStream +# Name = LTO-3 +# Media Type = LTO-3 # Archive Device = @TAPEDRIVE@ # AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes -# Offline On Unmount = no -## The min/max blocksizes of 32768 are *required* -# Minimum Block Size = 32768 -# Maximum Block Size = 32768 -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" -#} - -# -# A DVD device -# -#Device { -# Name = "DVD Writer" -# Media Type = DVD -# Device Type = DVD -# Archive Device = /dev/hdc -# LabelMedia = yes; # lets Bacula label unlabeled media -# Random Access = Yes; -# AutomaticMount = yes; # when device opened, read it +# AlwaysOpen = yes; # RemovableMedia = yes; -# AlwaysOpen = no; -# MaximumPartSize = 800M; -# RequiresMount = yes; -# MountPoint = /mnt/cdrom; -# MountCommand = "/bin/mount -t iso9660 -o ro %a %m"; -# UnmountCommand = "/bin/umount %m"; -# SpoolDirectory = /tmp/backup; -# WritePartCommand = "@scriptdir@/dvd-handler %a write %e %v" -# FreeSpaceCommand = "@scriptdir@/dvd-handler %a free" +# RandomAccess = no; +# Maximum File Size = 4GB +## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +## Changer Device = /dev/sg0 +## AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +## If you have smartctl, enable this, it has more info than tapeinfo +## Alert Command = "sh -c 'smartctl -H -l error %c'" #} # -# For OpenBSD OS >= 3.6 +# A Linux or Solaris LTO-4 tape drive # #Device { -# Name = DDS-3 -# Media Type = DDS-3 -# Archive Device = /dev/nrst0 -# Use MTIOCGET= no -# BSF at EOM = yes -# TWO EOF = no -# AutomaticMount = yes; +# Name = LTO-4 +# Media Type = LTO-4 +# Archive Device = @TAPEDRIVE@ +# AutomaticMount = yes; # when device opened, read it # AlwaysOpen = yes; # RemovableMedia = yes; # RandomAccess = no; -# If you have smartctl, enable this, it has more info than tapeinfo -# Alert Command = "sh -c 'smartctl -H -l error %c'" +# Maximum File Size = 5GB +## Changer Command = "@scriptdir@/mtx-changer %c %o %S %a %d" +## Changer Device = /dev/sg0 +## AutoChanger = yes +# # Enable the Alert command only if you have the mtx package loaded +## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +## If you have smartctl, enable this, it has more info than tapeinfo +## Alert Command = "sh -c 'smartctl -H -l error %c'" #} + + + # -# A very old Exabyte with no end of media detection +# A FreeBSD tape drive # #Device { -# Name = "Exabyte 8mm" -# Media Type = "8mm" -# Archive Device = @TAPEDRIVE@ -# Hardware end of medium = No; +# Name = DDS-4 +# Description = "DDS-4 for FreeBSD" +# Media Type = DDS-4 +# Archive Device = /dev/nsa1 # AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = Yes; -# RemovableMedia = yes; -# RandomAccess = no; +# AlwaysOpen = yes +# Offline On Unmount = no +# Hardware End of Medium = no +# BSF at EOM = yes +# Backward Space Record = no +# Fast Forward Space File = no +# TWO EOF = yes # If you have smartctl, enable this, it has more info than tapeinfo # Alert Command = "sh -c 'smartctl -H -l error %c'" #} diff --git a/bacula/technotes b/bacula/technotes index 2176528db4..e570254ad4 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,8 @@ General: +15Jul09 +kes Add more example SD Device configurations. 14Jul09 kes Tweak debug print in accurate kes Apply patch in bug #1315 by McMichaeli that fixes scripts/logwatch -- 2.39.5