TOC%

This document describes how to install amanda on Centos7, and also connect it to a new tape library EMC-ML3.

About EMC-ML3

It has 2 drivers, It has 32 usable slots, we use HP C7976A LTO-6 Tapes 2.5TB tapes (capacity is 2.5TB without compression, 6.25TB with compression). The compression is enabled on the drivers. Both drivers are connected (via Mini SAS26P SFF-8088 to SFF-8088 ) to the same SAS 6Gbps PCI-e Dual Port Full height DPN/ 12DNW card installed on umamanda.local

In theory, we can install 2 SAS 6Gpbs or 12Gpbs (however the 12Gpbs SAS hard we have if of half height, it does not fit into the PCI slot of the umamanda machine), and have each driver of the tape library connect to one SAS card.

According to the user guide, SAS 6Gbps card with LTO6 driver (our current configuration) can reach 160MB/s IO rate, while it can reach 300MB/s with LTO8.

The ML-3 has 2 catriage magazines, each comes with 20 catriages but only 16 catriages of them are accessible by the tape library, the other 4 which are located at the very bottom row (5th row from up to down)of the catriage are not accessible. The tape library does not see the tapes from those catriages.

When there is a tape in the driver, please make sure to leave an empty catriage in the usable catriages (the top 4 rows of each catriage magazine) to unload the tape from driver later.

As shown above, the numbers of the lowest row (1, 6, 11, 16, 21, 26, 31, 36) are inaccessible to the accessor, so only 32 cartridges can be loaded

The slot mapping in Amanda is different, as show in the figure below.

amanda_slot_mapping2.png

About umamanda

The disk server for the tape library, it runs amanda to do backup. It is a Dell R510 machine, it has 12*1TB disks, configured as RAID0 via its internal raid controller, and it has a holding disk of 11TB.

Management on EMC-ML3

One can log in to the web interface of the ML3 tape library for operations, such as moving the tapes between slots, and view status of drivers, and configure network/alert etc. The mamagement URL is on private IP, one needs to use google-chrome from the interactive machines.

https://10.10.1.86

domain name: ml3tape.local

web login : administrator/Re..

Configure the Tape Library (EMC-ML3)

Install rpms to operate the tape library and drivers

#yum install mtx mt-st

Note: mtx can operate the tape library, mt can operate on the drivers.

Find devices names for the tape library and drivers

Find the device name for the tape library /dev/sg3, make it rw to other users
#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.

Test the tape libary and the drivers with mtx and mt commands

#mtx -f /dev/sg3 status|inquiry
#mt -f /dev/st0 status #mt -f /dev/st1 status

Amanda installation (target os is centos 7)

Install dependent rpm

Before compile Amanda, need to install the following dependent rpms

#yum install perl-ExtUtils-Embed* glib2* star gnuplot samba-client

Compile Amanda

Download source code of Amanda from https://sourceforge.net/projects/amanda/

#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

Configure Amanda

Create directories

Adding amanda user(this is created by the Amanda install) to group sys

#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

Configure Amanda conf files

details see /etc/amanda/amanda.conf.common; /etc/amanda/umatlas/amanda.conf ; /etc/amanda/umatlas/disklist
disklist

Note: disklist is copied from bambi (the old amanda server)

/etc/amanda/umatlas/amanda.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

/etc/amanda/amanda.conf.common

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

Label the tapes

(can write a script to label all tapes)

#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)

Run amlabel for each tape

Test the configuration file

Test the server configuration

#amcheck umatlas -s;

Test connection to a host(needs to do backup)

Assume this host already have amanda-backup-client installed, and cf-agent -K -b amanda

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

Test dump

(run a backup for a host/disk, first can test backup from localhost)

#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
Topic attachments
I Attachment Action Size Date Who Comment
1.pngpng 1.png manage 28 K 25 Jul 2019 - 22:13 WenjingWu ML3 catriage magazine layout
UG.pdfpdf UG.pdf manage 17 MB 25 Jul 2019 - 22:29 WenjingWu ML3 user guide
amanda_slot_mapping2.pngpng amanda_slot_mapping2.png manage 7 K 17 Sep 2019 - 19:33 WenjingWu  
Topic revision: r2 - 17 Sep 2019, WenjingWu
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback