Bacula-users

Re: [Bacula-users] Recycling issue

2014-08-06 01:47:46
Subject: Re: [Bacula-users] Recycling issue
From: Kern Sibbald <kern AT sibbald DOT com>
To: Joe Rhodes <lists AT joerhodes DOT com>, bacula-users AT lists.sourceforge DOT net
Date: Wed, 06 Aug 2014 07:41:59 +0200
Hello,

Probably 95% of all such problems are due to configurations where the MediaType is not properly set.

- If you are using any form of autochanger, each autochanger must have a *unique* MediaType.

- Each Device configuration in the SD must have a unique MediaType for each different ArchiveDevice definition.  Said the other way around, each ArchiveDevice definition must have its own unique MediaType.

The .conf files you list are incomplete, so it is not possible to analyze them, but when I see:  MediaType = File, that raises a red flag that indicates that there may be other Storage devices with the same MediaType, and if that is the case, sooner or later, you will find that Bacula is very confused.

In the next Bacula version, I will probably modify the SD and possibly the Dir to require unique MediaTypes, then this problem will be resolved.

I don't usually supply "support"  because I don't have the time, but this particular problem interests me from the standpoint that I would like to prevent it, but with no console/job output showing the failures and incomplete DIR and SD confs I cannot do any more.

Best regards,
Kern

On 08/05/2014 03:08 PM, Joe Rhodes wrote:
I’m also running into this issue.  

In my case, I’ve setup a disk-based auto-changer (vchanger) with two pools:  Full and Weekly.  Each pool has multiple drives with 8 volumes on each drive.  The script that mounts the disk also issues an “update slots” command in bconsole, and I can verify that bacula sees the correct volumes as “InChanger”.

When I swap out disks (weekly), Bacula continues to look for volumes that were append-able, but on the previous disk (and not currently marked as “InChanger”) and refuses to write to the append-able volumes on the new disk that are marked as “InChanger”.  It marks all the previous volumes it cannot access as “Error”, and only then will it begin writing to the currently loaded volumes.

This  line from the “Recycling Algorithm” led me to believe that it would use a volume that was InChanger first:  "If the request is for an Autochanger device, look only for Volumes in the Autochanger (i.e. with InChanger set and that have the correct Storage device).”

But it seems I’m missing something.  I’ve included relevant bits from my bacula-dir.conf file if anyone can see what I’m doing wrong.  I’m getting this on two systems, one running Bacula 5.2.12 and one running 7.0.4.

My other option is to split these all into separate pools, but that’s going to make scheduling much harder.

Thanks in advance!
-Joe Rhodes


# Definition of file Virtual Autochanger device

Storage {
  Name = removeable-drives
  Address = 10.11.1.2
  SDPort = 9103
  Password = “password"
  Device = ExternalDrives
  Media Type = File
  Maximum Concurrent Jobs = 1
}

# Pools
Pool {
  Name = FullSet
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Use Duration = 1 week
  #We're on an 2 month rotation
  VolumeRetention = 58 days
  Maximum Volumes = 32  # 4 drives with 8 volumes on each
  Storage = removeable-drives
}


Pool {
  Name = Weekly
  Pool Type = Backup
  Recycle = yes
  AutoPrune = yes
  Volume Use Duration = 1 week
  VolumeRetention =  3 weeks
  Maximum Volumes = 40  # 5 drives with 8 volumes on each
  Storage = removeable-drives
}


And my bacula-sd.conf:

# Define a Virtual autochanger

Autochanger {
  Name = ExternalDrives
  Device = ExternalDrives-Drive1
  Changer Command = "/usr/local/bin/vchanger -u root  %c %o %S %a %d"
  Changer Device = "/etc/bacula/vchanger1.conf"
}

Device {
  Name = ExternalDrives-Drive1
  DriveIndex = 0
  Autochanger = yes
  DeviceType = File
  Media Type = File
  Archive Device = /var/lib/bacula/removeable-drives/0/drive0
  Random Access = Yes;
  AutomaticMount = yes;              
  RemovableMedia = no;
  AlwaysOpen = no;
  Maximum Concurrent Jobs = 5;
  Maximum Volume Size = 476250 M;  # with 8 volumes per drive, this should leave about 
                                # 4,800 MB free for other things, or about 0.125%
}




From: Gael Guilmin <Gael.Guilmin AT PDGM DOT com>
Subject: [Bacula-users] Recycling issue
To: "bacula-users AT lists.sourceforge DOT net"
<bacula-users AT lists.sourceforge DOT net>
Message-ID:
<05520d1d14f2408f8d048f1e1dfe6268 AT BLUPR07MB836.namprd07.prod.outlook DOT com>

Content-Type: text/plain; charset="us-ascii"

Hello,
I'm facing an issue with Bacula (5.2.12) on a Ubuntu server (12.04.4 LTS): I don't know why, but the server, after finishing writing on a tape, tries to use a tape that is not in the autochanger, despite the fact that there are plenty of online and usable tape in the Scratch pool...

Any idea?

Best regards,
Gael
--
System Administrator / IT
[PDM_Logo_RGB - registered]
78, Avenue du XXeme Corps
54000 Nancy
France
Phone(Paris): +33 (0)1 49 49 05 25
Phone(Nancy): +33 (0)3 83 67 66 39
Cell: +33 (0)6 10 18 48 43
Web: www.pdgm.com<http://www.pdgm.com/>


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk


_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users