[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bacula-devel] BUG: 2.2.6 on Debian


Kern,

Another bug report on Debian, using version 2.2.8.  

Basically, when you run 'update slots', the status of volumes that
were in the library, but are now removed, does not get updated to
reflect that their slot number should be 'zero'


Here's the mysql query I ran:

   select VolumeName,PoolId,LastWritten,Slot,VolStatus,VolBytes from
   Media where Slot != 0 ORDER by slot;


And the (partial) output I get is this:

  | CBR382        | 2 | 2007-12-07 01:32:10 |   13 | Error |  30911827968 |
  | CBR334        | 2 | 2008-01-23 18:17:12 |   13 | Full  |  22174516224 |
  | CBR374        | 2 | 2007-12-03 21:46:44 |   14 | Full  |  35934087168 |
  | CBR331        | 2 | 2008-01-27 01:58:42 |   14 | Full  |  36571852800 |
  | CBR375        | 2 | 2007-12-03 14:25:43 |   15 | Full  |  32288578560 |
  | CBR383        | 2 | 2007-12-05 01:18:21 |   15 | Full  |  31922795520 |
  | CBR328        | 2 | 2008-01-28 00:21:01 |   15 | Full  |  32188649472 |
  | CBR300        | 2 | 2007-10-08 18:30:23 |   16 | Full  |  35195618304 |
  | CBR325        | 2 | 2008-01-27 22:20:07 |   16 | Full  |  35415991296 |


Notice how I have multiple volumes showing up in the same slot.  This
seems to be a bad thing.  Shouldn't the basic idea be when the 'update
slots' command is run to do the following perl pseudo code:

  $juke = ...;
  foreach $vol (@volumes) {
        # If the volume is listed as being in the jukebox we're
        # updating, pre-zero it.
	if ($vol->juke eq $juke) {
	  $vol->slot = 0;
        }
        # Paranoia check, if the volume isn't in a library, make sure 
        # it's not in a slot.
	if ($vol->juke eq "") {
          $vol->slot = 0;
        }
  }

  foreach $line (@mtx-output) {
	($vol,$slot) = parsemtx($line);
        $vol->slot = $slot;
	$vol->jukebox = $juke;
  }


Now I must admit I haven't looked into the C code to see how this is
done, but I suspect my clearing stage isn't being done.

Hopefully this helps, let me know if you need more details or want me
to poke at the code more.

John

-------------------------------------------------------------------------
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-devel mailing list
Bacula-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/bacula-devel


This mailing list archive is a service of Copilot Consulting.