>>>>> On Tue, 13 Feb 2007 15:12:40 +0100, Andrea Venturoli said:
> 
> > If it did, it might be useful to find out what that tape contains by doing
> > 
> > bls -c bacula-sd.conf -j -V'*' /dev/nsa0
> 
> Here it is:
> 
> # bls -c /usr/local/etc/bacula-sd.conf -j -V'*' /dev/nsa0
> bls: match.c:249 add_fname_to_include prefix=0 gzip=0 fname=/
> bls: butil.c:283 Using device: "/dev/nsa0" for reading.
> 08-Feb 11:22 bls: Ready to read from volume "*" on device "DDS-4" 
> (/dev/nsa0).
> Volume Record: File:blk=0:1 SessId=2 SessTime=1170507971 JobId=2 DataLen=165
> End Job Session Record: File:blk=3:5232 SessId=2 SessTime=1170507971 
> JobId=1972
>     Date=06-Feb-2007 15:55:03 Level=F Type=B Files=122,364 
> Bytes=34,134,798,291 Errors=0 Status=T
> Begin Job Session Record: File:blk=4:1 SessId=6 SessTime=1170507971 JobId=1978
>     Job=CentralinoBackup.2007-02-06_17.42.44 Date=06-Feb-2007 17:42:51 
> Level=F Type=B
> End Job Session Record: File:blk=4:959 SessId=6 SessTime=1170507971 JobId=1978
>     Date=06-Feb-2007 17:43:37 Level=F Type=B Files=3 Bytes=61,681,781 
> Errors=0 Status=T
> Begin Job Session Record: File:blk=5:1 SessId=7 SessTime=1170507971 JobId=1979
>     Job=SqlsrvBackup.2007-02-06_17.44.10 Date=06-Feb-2007 17:44:17 Level=F 
> Type=B
> End Job Session Record: File:blk=5:7109 SessId=7 SessTime=1170507971 
> JobId=1979
>     Date=06-Feb-2007 17:48:49 Level=F Type=B Files=57 Bytes=457,557,952 
> Errors=0 Status=T
> 08-Feb 11:54 bls: End of Volume at file 6 on device "DDS-4" (/dev/nsa0), 
> Volume "*"
> 08-Feb 11:54 bls: End of all volumes.
> 
> 
> 
> > Also, the output of
> > 
> > select * from jobmedia
> >  where mediaid=(select mediaid from media where volumename='Tape41')
> >  order by startfile;
> > 
> > would tell is what Bacula thinks it contains.
> 
> Here it is again:
> 
> 
> bacula=> select * from jobmedia where mediaid=(select mediaid from media 
> where volumename='Tape41') order by startfile;
>   jobmediaid | jobid | mediaid | firstindex | lastindex | startfile | endfile 
> | startblock | endblock | volindex | copy
> +------------+-------+---------+------------+-----------+-----------+---------+------------+----------+----------+------
>         2698 |  1972 |     403 |      99912 |    108622 |         0 |       0 
> |          1 |    15499 |       33 |    0
>         2699 |  1972 |     403 |     108622 |    116328 |         1 |       1 
> |          0 |    15499 |       34 |    0
>         2700 |  1972 |     403 |     116328 |    121570 |         2 |       2 
> |          0 |    15499 |       35 |    0
>         2701 |  1972 |     403 |     121570 |    122364 |         3 |       3 
> |          0 |     5231 |       36 |    0
>         2705 |  1978 |     403 |          1 |         3 |         4 |       4 
> |          0 |      958 |        1 |    0
>         2706 |  1979 |     403 |          1 |        57 |         5 |       5 
> |          0 |     7108 |        1 |    0
> (6 rows)
> 
> 
> 
> Where do I go from here?

Hmmm, there are a few strange things here:

1) bls says that the tape ends at file 6, which matches the jobmedia table,
   which is good.  More importantly, it also matches the catalog value from
   the mismatch in bacula-sd of 06-Feb 17:59.  However, that bacula-sd run saw
   end of tape at file 5 for some reason.

2) There are some missing job records in the bls output between the Volume
   Record and the first End Job Session Record.

3) The volindex values don't start at 1 for job 1972.

Did the previous tape get filled while writing job 1972, i.e. does Tape41
contain the second part of that job?  That would explain 3.

What is printed if you run

btape -c bacula-sd.conf /dev/nsa0

with Tape41 in the drive and then issue the commands

rewind
status
eod
status
quit

(disclaimer: I would not expect those commands to modify the tape, but btape
is potentially dangerous.)

__Martin

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to