Bacula-users

Re: [Bacula-users] bacula-dir stuck trying to mount the wrong volume (Re: vchanger Intervention needed)

2014-09-04 17:04:41
Subject: Re: [Bacula-users] bacula-dir stuck trying to mount the wrong volume (Re: vchanger Intervention needed)
From: Josh Fisher <jfisher AT pvct DOT com>
To: Dimitri Maziuk <dmaziuk AT bmrb.wisc DOT edu>, bacula-users AT lists.sourceforge DOT net
Date: Thu, 04 Sep 2014 17:01:55 -0400
On 9/4/2014 3:57 PM, Dimitri Maziuk wrote:
On 09/04/2014 02:23 PM, Josh Fisher wrote:
...
One possibility is that you need to do a 'update slots' command to bring Bacula 
into sync. If anything has changed with regard to which volumes are currently 
online, then the update slots command is necessary to bring Bacula back into sync.
Hmm. So after you delete a volume, you need to run 'update slots'?
Because I have deleted some volumes and now I got 'Volume
"vchanger_0011_0021" not found in catalog. Slot=256 InChanger set to zero.'

Yes. Anything that alters which volumes are in which slots requires an 'update slots'. I suspect running update slots will help and it certainly can't hurt. Bacula keeps volume-to-slot mapping in its database. Deleting a volume is the equivalent of removing a tape from a real tape changer. The only way Bacula has to get its db back into sync with the actual device, be it vchanger or real tape changer, is for the op to issue an update slots. This causes Bacula to invoke vchanger (or mtx-changer) with the LIST command and refresh its database.


Is vchanger_0008_0011 currently available in a slot? Running 'vchanger 
/path/to/vchanger.conf list' will list vchanger's idea of which volumes are in 
which slots. The question is why didn't Bacula load vchanger_0008_0011 and use 
it? Is Bacula attempting to load it and failing, or does it not even attempt to 
load it?
Please keep in mind that this is wrong: after vchanger_0007_0011 fills
up I want vchanger_0007_0012, *not* vchanger_0008_0011. That said:

Bacula has an algorithm for selecting which volume is the "next" available volume. It is not just sequential, but takes into consideration date/time last recycled, whether the volume is currently in a slot, and etc. I'm not up on the exact details.


293:vchanger_0007_0011
294:vchanger_0007_0012
...
340:vchanger_0008_0011

Currently changer's log file is empty, bacula's log is

Current Volume "vchanger_0007_0011" not acceptable because:
    1998 Volume "vchanger_0007_0011" status is Full, volume has recycling disabled.
04-Sep 13:26 holstein-sd JobId 5431: 3307 Issuing autochanger "unload slot 293, drive 0" command.
04-Sep 13:26 holstein-sd JobId 5431: 3301 Issuing autochanger "loaded? drive 0" command.
04-Sep 13:26 holstein-sd JobId 5431: 3302 Autochanger "loaded? drive 0", result: nothing loaded.
04-Sep 13:26 holstein-sd JobId 5431: 3304 Issuing autochanger "load slot 293, drive 0" command.
04-Sep 13:26 holstein-sd JobId 5431: 3305 Autochanger "load slot 293, drive 0", status is OK.
04-Sep 13:26 holstein-sd JobId 5431: Warning: Director wanted Volume "vchanger_0008_0011".
So it keeps asking for the slot it's just unloaded (because it filled up
& the file size confirms that). I can bump vchanger's log_level up from
LOG_ERR, but this doesn't look like vchanger's problem in the first place.

We'll see if "update slots" fixed anything, but I really don't see why
as the slots in question: 293, 294, and 340 never changed.



------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/


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

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users