Bacula-users

Re: [Bacula-users] Bacula can't append to tapes

2008-11-25 22:19:01
Subject: Re: [Bacula-users] Bacula can't append to tapes
From: "David Jurke" <David.Jurke AT tnzi DOT com>
To: "bacula-users AT lists.sourceforge DOT net" <bacula-users AT lists.sourceforge DOT net>
Date: Wed, 26 Nov 2008 16:05:32 +1300

Further update: some couple of hours later, it finished the btape test, failed with the same set of messages as below.

 

Cheers,

 

DJ


From: David Jurke [mailto:David.Jurke AT tnzi DOT com]
Sent: Wednesday, 26 November 2008 12:01
To: bacula-users AT lists.sourceforge DOT net
Subject: Re: [Bacula-users] Bacula can't append to tapes

 

Update: after 30 minutes, btape test has moved on a step.

 

Watch this space...

 

DJ

 


From: David Jurke
Sent: Wednesday, 26 November 2008 11:30
To: David Jurke; 'bacula-users AT lists.sourceforge DOT net'
Subject: RE: Bacula can't append to tapes

 

One more bit of information...

 

I added “Two EOF = yes” to the tape device config, and re-ran the btape test:

-----------------------------

*test

 

=== Write, rewind, and re-read test ===

 

I'm going to write 1000 records and an EOF

then write 1000 records and an EOF, then rewind,

and re-read the data to verify that it is correct.

 

This is an *essential* feature ...

 

-----------------------------

 

and it’s been sitting there for several minutes now, no sign of activity, I don’t know what it’s doing.

 

 

Cheers,

 

DJ

 


From: David Jurke
Sent: Wednesday, 26 November 2008 11:27
To: 'bacula-users AT lists.sourceforge DOT net'
Subject: Bacula can't append to tapes

 

Hiya Bacula-Users,

 

I have a number of clients backing up across the network to a dedicated Bacula backup server. We have an IBM TS3310 (two drives and 30 tape cartridges) attached to our SAN and presented to the backup server, appearing as three SCSI IDs.

 

The problem I have is that Bacula has a problem appending to a previously-used tape. It’s fine if the tape has only just been written to - we have a dozen or so backup jobs running overnight, and they all write to the same tape quite happily. But if the tape has been re-loaded between jobs, or (I think - I’ve only seen this once) if there’s something of a gap between jobs, it complains and marks the tape in error and fetches a new one. I believe it’s a problem skipping to the end of the tape, it can’t find it.

 

The message I get in the backup job log is this:

------------------------------------------

...

23-Nov 19:56 wnvsvmp1 JobId 1289: Volume "I30043L3" previously written, moving to end of data.

23-Nov 19:56 wnvsvmp1 JobId 1289: Error: Unable to position to end of data on device "Tape-0" (/dev/IBMtape1n): ERR=dev.c:1325 read error on "Tape-0" (/dev/IBMtape1n). ERR=Input/output error.

 

23-Nov 19:56 wnvsvmp1 JobId 1289: Marking Volume "I30043L3" in Error in Catalog.

23-Nov 19:56 wnvsvmp1 JobId 1289: 3307 Issuing autochanger "unload slot 9, drive 0" command.

...

------------------------------------------

 

Tape device config is thus:

-------------------------------------------

Device {

  Name = Tape-0

  Device Type = Tape

  Drive Index = 0

  Media Type = LTO-3

  Archive Device =  /dev/IBMtape1n

  AutomaticMount = yes;

  AlwaysOpen = yes;

  RemovableMedia = yes;

  RandomAccess = no;

  AutoChanger = yes;

  Autoselect = yes;

  LabelMedia = yes;

 

# RECOMMENDED BY btape test

  Fast Forward Space File = No

  Hardware End of Medium = No

  BSF at EOM = yes

 

  Offline on Unmount = yes;

  Maximum Changer wait = 600

 

  Spool Directory = /backup/bacula/spool-tape0

  Maximum Spool Size = 53687091200      # 50 GB

 

Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'"

}

-------------------------------------------

(The Spool directives are a red herring, I’m not spooling any more.)

 

I’ve tried running btape test, and the first result I got is it failed, recommended the three lines mentioned above, tried again and Kaboomed.

After putting those three lines in, it works until the append test, which says:

--------------------------------------------

=== Append files test ===
 
This test is essential to Bacula.
 
I'm going to write one record  in file 0,
                   two records in file 1,
             and three records in file 2
 
btape: btape.c:475 Rewound "Tape-0" (/dev/IBMtape1n)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Tape-0" (/dev/IBMtape1n)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Tape-0" (/dev/IBMtape1n)
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:1577 Wrote one record of 64412 bytes.
btape: btape.c:1579 Wrote block to device.
btape: btape.c:505 Wrote 1 EOF to "Tape-0" (/dev/IBMtape1n)
26-Nov 11:12 btape: Fatal Error at btape.c:368 because:
dev open failed: dev.c:432 Unable to open device "Tape-0" (/dev/IBMtape1n): ERR=Input/output error
 
 
Append test failed.
 
 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Unable to correct the problem. You MUST fix this
problem before Bacula can use your tape drive correctly
 
Perhaps running Bacula in fixed block mode will work.
Do so by setting:
 
Minimum Block Size = nnn
Maximum Block Size = nnn
 
in your Storage daemon's Device definition.
nnn must match your tape driver's block size, which
can be determined by reading your tape manufacturers
information, and the information on your kernel dirver.
Fixed block sizes, however, are not normally an ideal solution.
 
Some systems, e.g. OpenBSD, require you to set
   Use MTIOCGET= no
in your device resource. Use with caution.

 --------------------------------------------

 

“tapeinfo” says, amongst other things,

        MinBlock: 1

        MaxBlock: 16777215

so I suspect the tape drive is not in fixed block mode. At which point I’m at a loss what I should do.

 

Any suggestions, anyone? Do I need to throw caution to the winds and set “Use MTIOCGET=no”?

 

 

Thanks,

 

David.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>