Bacula-users

[Bacula-users] Problem changing tapes due to inconsistency between 'list media' and 'query catalog'?

2010-01-28 04:44:59
Subject: [Bacula-users] Problem changing tapes due to inconsistency between 'list media' and 'query catalog'?
From: Thomas Dhollander <thomas.dhollander AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 28 Jan 2010 10:42:31 +0100
Dear all 

In our current setup, Bacula does not seem to automatically load the correct tape in the drive for its backups. We did specify the correct autochanger options in the storage daemon conf file and made sure the device uses the autochanger. 

When we execute the 'list media' command in bconsole, we get the following output: 

Automatically selected Catalog: ClientDB 
Using Catalog "ClientDB" 
Pool: Default 
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ 
| MediaId | VolumeName | VolStatus | Enabled | VolBytes       | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         | 
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ 
|       1 | 426BBL     | Append    |       1 | 26,842,862,592 |       65 |   31,536,000 |       1 |    0 |         1 | LTO-4     | 2010-01-28 06:00:11 | 
+---------+------------+-----------+---------+----------------+----------+--------------+---------+------+-----------+-----------+---------------------+ 

from which i derive that Bacula recognizes one pool ('Default') with one associated volume, that is currently in the autochanger. 

But the 'query catalog' command (we use the mysql db) seems not to know about the volume in the autochanger: 

*query catalog 
Automatically selected Catalog: ClientDB 
Using Catalog "ClientDB" 
Available queries: 
     1: List up to 20 places where a File is saved regardless of the directory 
     2: List where the most recent copies of a file are saved 
     3: List last 20 Full Backups for a Client 
     4: List all backups for a Client after a specified time 
     5: List all backups for a Client 
     6: List Volume Attributes for a selected Volume 
     7: List Volumes used by selected JobId 
     8: List Volumes to Restore All Files 
     9: List Pool Attributes for a selected Pool 
    10: List total files/bytes by Job 
    11: List total files/bytes by Volume 
    12: List Files for a selected JobId 
    13: List Jobs stored on a selected MediaId 
    14: List Jobs stored for a given Volume name 
    15: List Volumes Bacula thinks are in changer 
    16: List Volumes likely to need replacement from age or errors 
Choose a query (1-16): 15 
No results to list. 

In addition, the logs show the following message blocks:

28-Jan 04:00 blade03-sd JobId 19: Invalid slot=0 defined in catalog for Volume "426BBL" on "TS2900" (/dev/nst0). Manual load may be required.
28-Jan 04:00 blade03-sd JobId 19: 3301 Issuing autochanger "loaded? drive 0" command.
28-Jan 04:00 blade03-sd JobId 19: 3302 Autochanger "loaded? drive 0", result: nothing loaded.
28-Jan 04:00 blade03-sd JobId 19: 3301 Issuing autochanger "loaded? drive 0" command.
28-Jan 04:00 blade03-sd JobId 19: 3302 Autochanger "loaded? drive 0", result: nothing loaded.
28-Jan 04:00 blade03-sd JobId 19: Warning: mount.c:219 Open device "TS2900" (/dev/nst0) Volume "426BBL" failed: ERR=dev.c:474 Unable to open device "TS2900" (/dev/nst0): ERR=No medium found

In other words, the catalog does not seem to know about the volumes in the autochanger slots? Could we run a bscan or take other actions to restore consistency between the catalog and the tape library? We already tried the 'update slots' command but that had no effect. 

Note that we are just getting started with Bacula soo re-initializing the whole catalog is an option if it would make our setup consistent again. 

Many thanks in advance 

Thomas
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users