Bacula-users

Re: [Bacula-users] Vchanger attempts to mount 5 volumes before stopping and requesting magazine change

2013-04-01 05:50:22
Subject: Re: [Bacula-users] Vchanger attempts to mount 5 volumes before stopping and requesting magazine change
From: Leon White <leon.white AT greenpeace DOT org>
To: Josh Fisher <jfisher AT pvct DOT com>
Date: Mon, 1 Apr 2013 17:38:10 +0800
Hi Josh,

thanks for taking the time once again to respond to support my bacula/vchanger project!

I was able to read, set up and configure the scripts you supplied, the variables are quite clear and anybody who set up their own bacula system should be able to fill them in. Note that it may be necessary to change the #!/bin/sh at the beginning of the files to #!/bin/bash depending on your system (mine is Ubuntu Server 12.10).

I plan to use this script to ensure that all volumes are set to disabled before and after they are used to prevent bacula from trying to use unmounted volumes. Is there any way to trigger this script to run silently as soon as the update slots command is triggered, or is there some other point we could trigger it during the process of swapping drives in the eSATA changer? Perhaps automount could do it and then subsequently use the bcommand script to call update slots in bconsole as well, making the process of changing drives effectively fully automatic and independent from the shell. I won't be operating this system forever, and I want to keep the process as simple as possible for anybody else who has to use it.

Thanks mate,
Leon


On Tue, Mar 26, 2013 at 12:13 AM, Josh Fisher <jfisher AT pvct DOT com> wrote:

On 3/22/2013 5:59 AM, Leon White wrote:
Hi list!

I am using Bacula 5.2.6 with vchanger 0.8.6 to backup a multi-terabyte fileset to a bunch of 1 and 2TB drives in an eSATA virtual autochanger. I have formatted each drive with one or two 2TB partitions with 186x 5GB volume slots, and vchanger switches between 2 magazine bays when necessary for the 2TB drives.

My problem is that when bacula hits the last writable volume in the virtual magazine, it attempts to load the next appendable volume from the next available magazine. Obviously, I haven't changed the drive yet, and bacula attempts this in vain 4 more times before pausing the job and requesting that I mount the next magazine. I then switch the drives in the changer, issue 'update slots', and bacula updates all the slot data. I thought it would then continue from the next volume it initially tried to mount, but instead it skips the first five volumes and starts writing the sixth. These volumes are marked as 'error' and not used. It looks like this:
http://i.troll.ws/e60e9955.png

This is what hitting the end of the magazine looks like (screenshot shows jump to next appendable volume, which happens not to be 0001): http://i.troll.ws/250d9942.png

Is there a way to tell bacula to stop and ask for a mount when it uses the last volume identified by update slots, and immediately request the magazine change? Or to step back to the first volume in a magazine after mounting and issuing update slots?

The trick is to disable a drive's volumes when it is not attached and enable them when attached. This can be done with the update volume=??? enabled=? command. Bacula will not consider a disabled volume available for use. I use the attached scripts for vchanger autochangers. They allow enabling/disabling all volumes on a magazine drive or only volumes on a magazine that are in a specified pool.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users




--
陆智诚 | Leon White 
绿色和平 | Greenpeace East Asia
+86 186 0692 9781 | Skype: strophy
行动,带来改变。 Positive change through action.
------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users