Below are a few guesses. They are a large part guesses because you didn't 
specify enough information: please see the Support page on the web site.

I suspect that perhaps you forgot to run the btape test command before using 
your tape or perhaps you are using an old Bacula that didn't perform the 
append test. The mismatch appears to be because your Device resource is not 
suitable for your drive.  The output from bscan indicates quite a number of 
problems as well, so the usefulness of the tape is questionable.

On Thursday 19 January 2006 19:32, Lance Brown wrote:
> I got this message in my logs from the backup run last night:
>
> 19-Jan 02:16 what-sd: Volume "Monthly-0004" previously written, moving
> to end of data.
> 19-Jan 02:22 what-sd: What.2006-01-19_02.05.01 Error: I canot write on
> Volume "Monthly-0004" because:
> The number of files mismatch! Volume=0 Catalog=112
> 19-Jan 02:22 what-sd: Marking Volume "Monthly-0004" in Error in Catalog.
>
> Monthly-0004 is the tape volume I've been backing up to the last several
> days, and I did a successful restore from it yesterday before leaving work.
>
> I verified the lable on the tape with btape and then ran bls to view the
> contents of the tape.  That worked just fine.  Trolling through the
> manual I found the bit about using bscan to update the Volume File
> Count.  I ran
>
>  bscan -V Monthly-0004 -v -m /dev/nst1
>
> and got the output listed at the end of this message.
>
> I restarted bacula-dir and bacula-sd, updated the Media entry for
> Monthly-0004 to set it to "Append" status, and tried re-running the
> failed job and got the same error message again.
>
> Here is the current Media table entry for Monthly-0004:
> +---------+--------------+-----------+--------------+----------+-----------
>---+---------+------+-----------+-----------+---------------------+
>
> | MediaId | VolumeName   | VolStatus | VolBytes     | VolFiles |
>
> VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten
>
> +---------+--------------+-----------+--------------+----------+-----------
>---+---------+------+-----------+-----------+---------------------+
>
> | 40      | Monthly-0004 | Error     | 94027500662  | 112      |
>
> 11059200     | 1       | 4    | 1         | LTO-1     | 2006-01-19
> 13:01:44 |
> +---------+--------------+-----------+--------------+----------+-----------
>---+---------+------+-----------+-----------+---------------------+
>
> What could be wrong here?  Why would bscan see the right data on the
> tape, but bacula-sd doesn't?  I've not editted the bacula-sd config file
> since I did the restore yesterday.
>
> Server:    Dell PowerEdge 2650
> OS:        CentOS 3.6 (fully updated)
> SCSI Card: LSI Logic / Symbios Logic LSI8952U
> Tape Unit: Dell PowerVault 132T with LTO-2 drive
> Bacula:    1.36.3
>
> bacula-sd Device stanza:
>
> Device {
>   Name = DPVLTO-2
>   Media Type = LTO-1
>   Archive Device = /dev/nst1
>   AutomaticMount = yes;               # when device opened, read it
>   AlwaysOpen = yes;
>   RemovableMedia = yes;
>   RandomAccess = no;
>   LabelMedia = yes;
>   Changer Command = "/etc/bacula/mtx-changer %c %o %S %a %d"
>   Changer Device = /dev/sg3
>   AutoChanger = yes;
>   Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"
> }
>
>
> --[Lance]
>
>
> bscan: butil.c:258 Using device: "/dev/nst1" for reading.
> 19-Jan 12:01 bscan: Ready to read from volume "Monthly-0004" on device
> /dev/nst1.
> bscan: bscan.c:274 Using Database: bacula, User: bacula
> bscan: bscan.c:403 Pool record for Monthly found in DB.
> bscan: bscan.c:417 Pool type "Backup" is OK.
> bscan: bscan.c:427 Media record for Monthly-0004 found in DB.
> bscan: bscan.c:445 Media type "LTO-1" is OK.
> bscan: bscan.c:454 VOL_LABEL: OK for Volume: Monthly-0004
> 19-Jan 12:02 bscan: Got EOF at file 1  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:02 bscan: Got EOF at file 2  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:02 bscan: Got EOF at file 3  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:546 Could not find SessId=3 SessTime=1137197448 for EOS
> record.
> 19-Jan 12:02 bscan: Got EOF at file 4  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:462 95051 "errors" ignored before first Start of Session
> record.
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:02 bscan: Got EOF at file 5  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:03 bscan: Got EOF at file 6  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:03 bscan: Got EOF at file 7  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:03 bscan: Got EOF at file 8  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:04 bscan: Got EOF at file 9  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:04 bscan: Got EOF at file 10  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:05 bscan: Got EOF at file 11  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:05 bscan: Got EOF at file 12  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:06 bscan: Got EOF at file 13  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:06 bscan: Got EOF at file 14  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:07 bscan: Got EOF at file 15  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:07 bscan: Got EOF at file 16  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:08 bscan: Got EOF at file 17  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:08 bscan: Got EOF at file 18  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:09 bscan: Got EOF at file 19  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:09 bscan: Got EOF at file 20  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:10 bscan: Got EOF at file 21  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:10 bscan: Got EOF at file 22  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:10 bscan: Got EOF at file 23  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:10 bscan: Got EOF at file 24  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:10 bscan: Got EOF at file 25  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:11 bscan: Got EOF at file 26  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:11 bscan: Got EOF at file 27  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:11 bscan: Got EOF at file 28  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:12 bscan: Got EOF at file 29  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:12 bscan: Got EOF at file 30  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:12 bscan: Got EOF at file 31  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:12 bscan: Got EOF at file 32  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:12 bscan: Got EOF at file 33  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:13 bscan: Got EOF at file 34  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:13 bscan: Got EOF at file 35  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:14 bscan: Got EOF at file 36  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:14 bscan: Got EOF at file 37  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:15 bscan: Got EOF at file 38  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:15 bscan: Got EOF at file 39  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:16 bscan: Got EOF at file 40  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:16 bscan: Got EOF at file 41  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:17 bscan: Got EOF at file 42  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:17 bscan: Got EOF at file 43  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:18 bscan: Got EOF at file 44  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:18 bscan: Got EOF at file 45  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:18 bscan: Got EOF at file 46  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:19 bscan: Got EOF at file 47  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:19 bscan: Got EOF at file 48  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:19 bscan: Got EOF at file 49  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:19 bscan: Got EOF at file 50  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:20 bscan: Got EOF at file 51  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:20 bscan: Got EOF at file 52  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:20 bscan: Got EOF at file 53  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:20 bscan: Got EOF at file 54  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:20 bscan: Got EOF at file 55  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:21 bscan: Got EOF at file 56  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:21 bscan: Got EOF at file 57  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:22 bscan: Got EOF at file 58  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:23 bscan: Got EOF at file 59  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:24 bscan: Got EOF at file 60  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:24 bscan: Got EOF at file 61  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:25 bscan: Got EOF at file 62  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:26 bscan: Got EOF at file 63  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:27 bscan: Got EOF at file 64  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:28 bscan: Got EOF at file 65  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:28 bscan: Got EOF at file 66  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:29 bscan: Got EOF at file 67  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:29 bscan: Got EOF at file 68  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:30 bscan: Got EOF at file 69  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:31 bscan: Got EOF at file 70  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:31 bscan: Got EOF at file 71  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:31 bscan: Got EOF at file 72  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:32 bscan: Got EOF at file 73  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:32 bscan: Got EOF at file 74  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:33 bscan: Got EOF at file 75  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:33 bscan: Got EOF at file 76  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:34 bscan: Got EOF at file 77  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:34 bscan: Got EOF at file 78  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:35 bscan: Got EOF at file 79  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:35 bscan: Got EOF at file 80  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:35 bscan: Got EOF at file 81  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:35 bscan: Got EOF at file 82  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:35 bscan: Got EOF at file 83  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:36 bscan: Got EOF at file 84  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:36 bscan: Got EOF at file 85  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:36 bscan: Got EOF at file 86  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:37 bscan: Got EOF at file 87  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:37 bscan: Got EOF at file 88  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:37 bscan: Got EOF at file 89  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:37 bscan: Got EOF at file 90  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:37 bscan: Got EOF at file 91  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:38 bscan: Got EOF at file 92  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:38 bscan: Got EOF at file 93  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:39 bscan: Got EOF at file 94  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:39 bscan: Got EOF at file 95  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:40 bscan: Got EOF at file 96  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:40 bscan: Got EOF at file 97  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:41 bscan: Got EOF at file 98  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:41 bscan: Got EOF at file 99  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:42 bscan: Got EOF at file 100  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:42 bscan: Got EOF at file 101  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:43 bscan: Got EOF at file 102  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:43 bscan: Got EOF at file 103  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:651 32,768 file records. At file:blk=103:209,464
> bytes=87,869,871,195
> 19-Jan 12:44 bscan: Got EOF at file 104  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:44 bscan: Got EOF at file 105  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:45 bscan: Got EOF at file 106  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:46 bscan: Got EOF at file 107  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:46 bscan: Got EOF at file 108  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:46 bscan: Got EOF at file 109  on device /dev/nst1, Volume
> "Monthly-0004"
> bscan: bscan.c:472 SOS_LABEL: Found Job record for JobId: 0
> 19-Jan 12:46 bscan: Got EOF at file 110  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:47 bscan: Got EOF at file 111  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:47 bscan: Got EOF at file 112  on device /dev/nst1, Volume
> "Monthly-0004"
> 19-Jan 12:47 bscan: End of Volume at file 112 on device /dev/nst1,
> Volume "Monthly-0004"
> 19-Jan 12:47 bscan: End of all volumes.
> bscan: bscan.c:849 Updated Media record at end of Volume: Monthly-0004
> bscan: bscan.c:600 End of all Volumes. VolFiles=112 VolBlocks=0
> VolBytes=94,027,500,662
> Records would have been added or updated in the catalog:
>       1 Media
>       1 Pool
>      27 Job
>   33230 File

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to