Bacula-users

Re: [Bacula-users] Problem with Tape Changer, mayber Autolabel too

2008-05-26 06:51:12
Subject: Re: [Bacula-users] Problem with Tape Changer, mayber Autolabel too
From: Arno Lehmann <al AT its-lehmann DOT de>
To: Bacula Users <bacula-users AT lists.sourceforge DOT net>
Date: Mon, 26 May 2008 12:50:40 +0200
Hi,

26.05.2008 10:28, Tobias Bartel wrote:
> Hallo List,
> 
> before i start this is my first Bacula setup and i am fairly certain that i 
> am 
> making a  newbie mistake but after two weeks of searching and testing i have 
> to ask for help.

Two weeks... no, I won't comment on that ;-)

> I have two job cycles, one does one full plus six incremental backups to 
> disk, 
> the other cycle is supposed to do one full backup once a week to tape. The 
> Job 
> using the file storage works flawlessly, the job using the tapes seems to 
> work 
> except it is not writing anything on the tape. Before the weekend i dumped 
> the 
> database and reset the tapes with this script:
> 
>> #!/bin/bash
>> for i in `seq 1 10`;
>> do
>>   echo "-$i"
>>   mtx -f /dev/sg2 load $i
>>   mt -f /dev/st0 rewind
>>   mt -f /dev/st0 weof
>>   mtx -f /dev/sg3 eject
>>   mtx -f /dev/sg2 unload $i
>> done    
> 
> 
> After that i did a "update slots scan" and waited for the job to run, today 
> the storage deamon shows me this:
>> Device status:
>> Autochanger "Ultrium-LTO2-Changer" with devices:
>>    "Ultrium-LTO2" (/dev/sg3)
>> Device "FileStorage" (/data/backup/bacula_file) is not open or does not 
>> exist.
>> Device "Ultrium-LTO2" (/dev/sg3) is not open or does not exist.
>>     Device is BLOCKED waiting for media.
>>     Slot 1 is loaded in drive 0.
>> ====
>>
>> In Use Volume status:
>> Tapes-0001 on device "Ultrium-LTO2" (/dev/sg3)
>> ====

Well, you don't have any volumes Bacula knows about.

Either manually label them ('label barcodes') or let Bacula 
automatically label them. Automatic labeling is turned on, but I think 
you could turn it off.

Two reasons for this:

- When using tape, loading new media involves manual interaction 
anyway. Issuing the label command is only a minor additional workload.
- It's easier to set up and you are less likely to run into problems 
when, for example, the drive doesn't recognize a valid tape and Bacula 
decides it should autolabel it.

Anyway, have you tried a 'mount' command or a manual label command?

> 
> Here are the relevant parts of the storage deamons config:
>> Autochanger {
>>   Name = Ultrium-LTO2-Changer
>>   Device = Ultrium-LTO2
>>   Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
>>   Changer Device = /dev/sg2
>> }
> 
>> Device {
>>   Name = Ultrium-LTO2
>>   Media Type = LTO-2
>>   Archive Device = /dev/sg3
>>   Changer Device = /dev/sg2
>>   Removable Media = yes
>>   RandomAccess = no
>>   Autochanger = yes
>>   Backward Space Record = yes
>>   Automatic Mount = yes
>>   Always Open = No
>>   LabelMedia = Yes
>>   DriveIndex = 0
>>   Changer Command = "/etc/bacula/scripts/mtx-changer %c %o %S %a %d"
>>
>> }
> 
> 
> Here from the director:
>> Pool {
>>   Name = Full-Pool-Tape
>>   Pool Type = Backup
>>   Maximum Volume Jobs = 1
>>   Purge Oldest Volume = yes
>>   Accept Any Volume = yes
>>   Label Format = "Tapes-"
>>   Recycle = yes
>>   AutoPrune = yes
>>   Volume Retention = 700 days
>> }
> 
>> Storage {
>>   Name = Tape
>>   Address = star.local
>>   SDPort = 9103
>>   Password = "m/k3mhFkxEXzQMbLDWXuGGlJgZX9P3j/kB70CoOQr740"
>>   Device = Ultrium-LTO2-Changer
>>   Media Type = LTO-2
>>   Autochanger = yes
>> }
> 
>> JobDefs {
>>   Name = "WeeklyDef-Full-Tape"
>>   Type = Backup
>>   Level = Full
>>   Schedule = "WeeklyCycle-Full"
>>   Storage = Tape
>>   Messages = Daemon
>>   Pool =  Full-Pool-Tape
>>   Priority = 10
>> }
> 
> 
>> Job {
>>   Name = "FirewallOffice-Full-Tape"
>>   Client = "FirewallOffice"
>>   Fileset = "FirewallOffice-Fileset"
>>   JobDefs = "WeeklyDef-Full-Tape"
>> }
> 
> Here the status of the changer:
> 
>> # mtx -f /dev/sg2 status
>>   Storage Changer /dev/sg2:1 Drives, 10 Slots ( 0 Import/Export )
>> Data Transfer Element 0:Full (Storage Element 1 Loaded)
>>       Storage Element 1:Empty
>>       Storage Element 2:Full 
>>       Storage Element 3:Full 
>>       Storage Element 4:Full 
>>       Storage Element 5:Full 
>>       Storage Element 6:Full 
>>       Storage Element 7:Full 
>>       Storage Element 8:Full 
>>       Storage Element 9:Full 
>>       Storage Element 10:Full 
> 
> and what mtx has to say about the devices:
>> # mtx -f /dev/sg2 inquiry
>> Product Type: Medium Changer
>> Vendor ID: 'NEC     '
>> Product ID: 'LL0101H-0A      '
>> Revision: '0002'
>> Attached Changer: No
>> # mtx -f /dev/sg3 inquiry
>> Product Type: Tape Drive
>> Vendor ID: 'IBM     '
>> Product ID: 'ULTRIUM-TD2     '
>> Revision: '38D0'
>> Attached Changer: No
> 
> I am using the Debian Etch packages of Bacula, so its version 1.38.11-8. If 
> any information is missing, please tell me, i will do my best in order to 
> provide anything you might need.
> 
> If anybody has any suggestions, tips or ideas what i could try i would love 
> to 
> hear them.

Upgrade.

You Bacula is outdated and might suffer from serious bugs.

Better do this before going production...

Arno

> Thanks in advance,
> 
> Tobi
> 
> 
> 

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>