domain name: ml3tape.local
web login : administrator/Re..
#yum install mtx mt-st
Note: mtx can operate the tape library, mt can operate on the drivers.
#chmod o+rw /dev/sg3
Find the device name for the drivers /dev/st0 and /dev/st1, make it rw to other users.
#chmod o+wr /dev/st0;chmod o+rw /dev/st1
Note: All tape related devices(including the tape library and tape drivers) can be found from /dev/tape/by-id/
I use mtx to test each of them, to make sure which one is for the tape library, which one is for the tape drivers.
#mtx -f /dev/sg3 status|inquiry
#mt -f /dev/st0 status #mt -f /dev/st1 status
#yum install perl-ExtUtils-Embed* glib2* star gnuplot samba-client
#cd /opt; tar zxvf amanda-3.5.1.tar.gz
#cd /opt/amanda-3.5.1
#./configure --with-bsdtcp-security --with-bsdudp-security --with-rsh-security --with-ssh-security --prefix=/usr --libexecdir=/usr --sysconfdir=/etc --with-group=
sys --localstatedir=/var --with-debugging=/var/log/amanda --with-fqdn --with-config=umatlas --with-smbclient=/usr/bin/smbclient --with-gnuplot=/usr/bin/gnuplot --
with-star=/usr/bin/star --with-gnutar=/usr/bin/gtar
#make;make install
#usermod -g sys amanda
[amanda@umamanda logs]$ id amanda
uid=55935(amanda) gid=3(sys) groups=3(sys)
#mkdir -p /data/holding
#mkdir -p /data/vtapes/slotX (x=1,2,n where n is the number of available tapes to Amanda)
#mkdir -p /etc/amanda/umatlas
#mkdir -p /etc/amanda/umatlas/state/{logs|curinfo|index}
#chown -R amanda /data/holding;chown -R amanda /data/vtapes; chown -R amanda /etc/amanda
#cp /etc/amanda/amanda-security.conf /etc/;chown root /etc/amanda-security.conf
# cat /etc/amanda/umatlas/amanda.conf
includefile "/etc/amanda/amanda.conf.common"
org "UMATLAS" # your organization name for reports
# runtapes should equal double the single tape capacity
runtapes 4 # number of tapes to be used in a single run of amdump
tapetype HP-LTO6 # what kind of tape it is (see tapetypes below)
labelstr "^[0-9][0-9][0-9][0-9][0-9][0-9]L6$" # label constraint regex: all tapes must match
infofile "/etc/amanda/umatlas/state/curinfo" # database DIRECTORY
logdir "/etc/amanda/umatlas/state/logs" # log directory
indexdir "/etc/amanda/umatlas/state/index" # index directory
## dumpcycle: over how many days to run a full backup
dumpcycle 7
## how many runs(amdump increamental backups) to run in one dumpcycle(full backup)
runspercycle 6
# the ideal tapecyle is at least (runspercycle+1)*runtapes
tapecycle 32 tapes
taper-parallel-write 2
define changer "3575-TL" {
tapedev "chg-robot:/dev/tape/by-id/scsi-35000e1114b48605e"
property "tape-device" "0=tape:/dev/st1"
property append "tape-device" "1=tape:/dev/st0"
holdingdisk hd1 {
directory "/data/holding" # where the holding disk is
use 10240000 mbytes #use 10TB
define tapetype HP-LTO6 {
comment "HP LTO6 2.5TB - Compression On"
length 2621440 mbytes
filemark 0 kbytes
Please note, in order to decide the tape-device order, one can run this command after the configuration, which points out the wrong configuration..
-bash-4.2$ amtape umatlas verify
ERROR: Drive 0 is not device tape:/dev/st0
HINT : Drive 0 looks to be device tape:/dev/st1
ERROR: Drive 1 is not device tape:/dev/st1
HINT : Drive 1 looks to be device tape:/dev/st0
property "TAPE-DEVICE" "0=tape:/dev/st1" "1=tape:/dev/st0"
0=tape:/dev/st1
0 is driver 0, the corresponding device is /dev/st1
Above message indicates that mapping of device and driver is wrong, and suggested the correct mapping.
0=tape:/dev/st1 1=tape:/dev/st0
This map is decided by the kernel. In order to figure out the map, one can also use mtx to load a tape to one driver, and leave the other driver empty, then use mt command to check which device is to that driver..For example, to figure out which device is for driver 0, do the following steps:
mtx -f /dev/sg3 status;mtx -f /dev/sg3 load 21 0;mx -f /dev/st1 status;mx -f /dev/st0 status
To check with device (/dev/st0 or /dev/st1) has the status of ONLINE (ONLINE means it is loaded with a tape)
-bash-4.2$ amtape umatlas verify
GOOD : Drive 0 is device tape:/dev/st1
GOOD : Drive 1 is device tape:/dev/st0
property "TAPE-DEVICE" "0=tape:/dev/st1" "1=tape:/dev/st0"
definitons for the configuration can be refered from http://wiki.zmanda.com/man/amanda.conf.5.html
Run amlabel for each tape#su - amanda
#amtape umatlas inventory (list the current tape barcode)
or generate a script file which does label of all the tapes
# mtx -f /dev/sg4 status|grep "Storage Ele"|awk -F " " '{print $3,$NF}'|awk -F ':|=' '{print "amlabel umatlas -f",$NF,"slot",$1}'
# amlabel umatlas 001005L6 slot 28 (run this for each tape)
#amcheck umatlas -s;
will configure the client. I have modified the cfengine policy file, so the client is using the new umamanda.local instead of bambi.local
root@umamanda# vi /etc/amanda/umatlas/disklist (add the following line)
umfs02.local /data08/backup medium-tar
[root@umfs02 ~]# vi /var/lib/amanda/.amandahosts (add the following line)
umamanda.local amanda amdump
#amcheck umatlas -c umfs02.local
#cat /etc/amanda/umatlas/disklist
localhost /etc high-tar
#su - amanda; amdump umatlas
Note: if run amdump before the tapes are labeled, then amanda will do a degraded backup, which is not accepted for a new disk(first backup), so the dump won\x92t backup anything.
Log files can be found in
/etc/amanda/umatlas/state/logs/log; /etc/amanda/umatlas/state/amdump
-- WenjingWu - 25 Jul 2019