On Monday 25 July 2005 17:38, Alan Brown wrote:
> On Mon, 25 Jul 2005, Kern Sibbald wrote:
> >> What kind of output/debugging do you need to analyse and detect virgin
> >> blank tapes?
> >
> > I don't know of any way to detect blank media. If you know how, using
> > standard Unix system calls, please fill me in.  In fact, there is
> > generally, no universal Unix means of detecting that no medium is in the
> > drive -- some OSes will tell you, but they are OS specific ioctl(),
> > which I have now started adding to Bacula.
> >
> > I'm not 100% sure what the problem is.  I see your output, but I don't
> > understand the problem.  Normally if you put up a blank tape and you
> > want to label it, you will get an error message, and Bacula will go
> > ahead and label it.
>
> It didn't - and autolabel is on
>
> I'm now getting a series of mail messages asking me to insert ALOW0041
> into tape drive 0, when it's already there:
>
> Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag =
> ALOW0041 Data Transfer Element 1:Empty
>
> As I said, writing a EOF at the start of the tape cures this problem and
> bacula will then happily label the tape.
>
> > Are you telling me that in some cases it doesn't work that way?
>
> Yes.
>
> > By the way, normally when it is not possible to rewind a drive, it is
> > because there is no tape mounted.  I don't understand why there would be
> > an error trying to rewind a drive containing a blank tape.  If that is
> > the case, then I think your OS is broken.
>
> It's Linux, (Suse SLES-8), using 2.4.21-169-smp
>
> > Before labeling a tape, Bacula does:
> > - rewind
> > - read
> >
> > If the rewind gets an error, Bacula assumes that something important is
> > wrong and probably gives up or tries another tape if one is available.
> >
> > If the read fails, Bacula prints the error message and assumes it is a
> > blank tape, rewinds it, writes the label, re-reads it, then rewinds
> > again.
> >
> > My reading on the above errors you are seeing:
> > In the above case, I suspect that you have an autochanger configuration
> > error. Either you are not waiting long enough after issuing the mtx load
> > command, or you are not using one of the wait loops that are in the
> > mtx-changer script. As a consequence, the mtx-changer script returns to
> > Bacula *before* the tape is loaded and read, Bacula rewinds the drive,
> > and gets an error.
>
> The pause is long enough for cases where the virgin tape has a EOF
> written to it or where the tape is labelled. I don't believe that's the
> problem.
>
>
> (Bacula 1.36.3)
>
> the same error recurs AFTER the tape has been loaded:
>
> *stat dir
> [snippage]
>    6381 Increme  Low-churn-peace2.2005-07-23_01.16.02 is waiting for a
> mount request
>
> *stat storage=MSL6000-0
>
> Connecting to Storage daemon MSL6000-0 at msslas:9103
>
> msslas-sd Version: 1.36.3 (22 April 2005) i686-pc-linux-gnu suse 8.1
> Daemon started 27-May-05 11:04, 771 Jobs run since started.
>
> Running Jobs:
> Incremental Backup job Low-churn-peace2 JobId=6381 Volume="ALOW0041"
> device="/dev/nst0"
>      Files=34,009 Bytes=108,343,509,235 Bytes/sec=479,474
>      FDReadSeqNo=3,541,649 in_msg=3460041 out_msg=3539 fd=7
>
>
> [snippage]
>
> Device status:
> Archive "FileStorage" is not open or does not exist.
> Archive "FileStorage2" is not open or does not exist.
> Device "/dev/nst0" open but no Bacula volume is mounted.
>      Device is BLOCKED waiting for appendable media.
>      Total Bytes Read=0 Blocks Read=0 Bytes/block=0
>      Positioned at File=0 Block=0
> Device "/dev/nst1" open but no Bacula volume is mounted.
>      Total Bytes Read=0 Blocks Read=0 Bytes/block=0
>      Positioned at File=0 Block=0
> Data spooling: 1 active jobs, 8,464,729,317 bytes; 742 total jobs,
> 50,000,033,440 max bytes/job.
> Attr spooling: 1 active jobs, 0 bytes; 742 total jobs, 1,130,787,541 max
> bytes.
>
> * mount MSL6000-0
> 3001 OK mount. Device=/dev/nst0
>
> * stat storage=MSL6000-0
>
> [snippage]
>
> Device status:
> Archive "FileStorage" is not open or does not exist.
> Archive "FileStorage2" is not open or does not exist.
> Device "/dev/nst0" open but no Bacula volume is mounted.
>      Device is being initialized.
>      Total Bytes Read=0 Blocks Read=0 Bytes/block=0
>      Positioned at File=0 Block=0
> Device "/dev/nst1" open but no Bacula volume is mounted.
>      Total Bytes Read=0 Blocks Read=0 Bytes/block=0
>      Positioned at File=0 Block=0
> Data spooling: 1 active jobs, 8,464,729,317 bytes; 742 total jobs,
> 50,000,033,440 max bytes/job.
> Attr spooling: 1 active jobs, 0 bytes; 742 total jobs, 1,130,787,541 max
> bytes.
>
>
>
> At this point the tape is loaded in the drive and has been for 48 hours.
>
> About 5 minuts later:
>
> *
> You have messages.
>
> *messages
>
> 25-Jul 16:29 msslas-sd: 3301 Issuing autochanger "loaded drive 0" command.
> 25-Jul 16:29 msslas-sd: 3302 Autochanger "loaded drive 0", result is Slot
> 3.
>
>
> Meantiem at this point in a bash shell:
>
> # tapeinfo -f /dev/sg25
>
> Product Type: Tape Drive
> Vendor ID: 'HP      '
> Product ID: 'Ultrium 2-SCSI  '
> Revision: 'F38W'
> Attached Changer: No
> SerialNumber: 'HUL3G04548'
> MinBlock:1
> MaxBlock:16777215
> SCSI ID: 2
> SCSI LUN: 1
> Ready: yes
> BufferedMode: yes
> Medium Type: Not Loaded
> Density Code: 0x42
> BlockSize: 0
> DataCompEnabled: yes
> DataCompCapable: yes
> DataDeCompEnabled: yes
> CompType: 0x1
> DeCompType: 0x1
> BOP: yes
> Block Position: 0
>
> ( vs the empty drive
>
> # tapeinfo -f /dev/sg26 | less
> Product Type: Tape Drive
> Vendor ID: 'HP      '
> Product ID: 'Ultrium 2-SCSI  '
> Revision: 'F43W'
> Attached Changer: No
> SerialNumber: 'HUL3H00344'
> MinBlock:1
> MaxBlock:16777215
> SCSI ID: 2
> SCSI LUN: 2
> Ready: no
> )
>
> And a few seconds later:
>
>
> *
> You have messages.
> *messages
> 25-Jul 16:34 msslas-sd: Low-churn-peace2.2005-07-23_01.16.02 Warning:
> Couldn't rewind device /dev/nst0 ERR=dev.c:406 Rewind error on /dev/nst0.
> ERR=Input/output error.
>
> 25-Jul 16:34 msslas-sd: Please mount Volume "ALOW0041" on Storage Device
> "MSL6000-0" for Job Low-churn-peace2.2005-07-23_01.16.02
>
>
> To my mind, this _proves_ it can't be the MTX timer, as mtx wasn't called
> to change tapes, only for its status report, as well as the point that
> there were several minutes between each set of messages.
>
>
> What ideas do you have from this point.?

You will have to manually run each of the steps that Bacula goes through to 
label a tape.  Many if not all of the steps can be done with btape (rewind, 
read, ...).  In doing so, you will probably be able to pin down the error.

-- 
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to