Bacula-users

Re: [Bacula-users] Btape fill test fatal error WEOF

2009-04-30 17:01:31
Subject: Re: [Bacula-users] Btape fill test fatal error WEOF
From: "Hayden Katzenellenbogen" <hayden AT nextlevelinternet DOT com>
To: "John Drescher" <drescherjm AT gmail DOT com>, "bacula-users" <Bacula-users AT lists.sourceforge DOT net>
Date: Thu, 30 Apr 2009 13:57:02 -0700
John,

I just changed the mtx-changer.conf file 

load_sleep=30

I then did

mt -f /dev/nst0 rewind
mt -f /dev/nst0 weof
mt -f /dev/nst0 rewind 

root@archive:~/bacula/etc# mtx -f /dev/sg1 unload
Unloading drive 0 into Storage Element 1...done
root@archive:~/bacula/etc# mtx -f /dev/sg1 load 3
Loading media from Storage Element 3 into drive 0...done
root@archive:~/bacula/etc# ../bin/btape -c bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:285 Using device: "/dev/nst0" for writing.
30-Apr 13:44 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
command.
30-Apr 13:44 btape JobId 0: 3302 Autochanger "loaded? drive 0", result
is Slot 3.
btape: btape.c:383 open device "Drive-1" (/dev/nst0): OK
*fill

This command simulates Bacula writing to a tape.
It requires either one or two blank tapes, which it
will label and write.

If you have an autochanger configured, it will use
the tapes that are in slots 1 and 2, otherwise, you will
be prompted to insert the tapes when necessary.

It will print a status approximately
every 322 MB, and write an EOF every 3.2 GB.  If you have
selected the simple test option, after writing the first tape
it will rewind it and re-read the last block written.

If you have selected the multiple tape test, when the first tape
fills, it will ask for a second, and after writing a few more 
blocks, it will stop.  Then it will begin re-reading the
two tapes.

This may take a long time -- hours! ...

Do you want to run the simplified test (s) with one tape
or the complete multiple tape (m) test: (s/m) m
Multiple tape test selected.
30-Apr 13:44 btape JobId 0: 3307 Issuing autochanger "unload slot 3,
drive 0" command.
30-Apr 13:44 btape JobId 0: 3304 Issuing autochanger "load slot 1, drive
0" command.
30-Apr 13:46 btape JobId 0: 3305 Autochanger "load slot 1, drive 0",
status is OK.
30-Apr 13:46 btape: Fatal Error at dev.c:1705 because:
dev.c:1704 Attempt to WEOF on non-appendable Volume
Wrote Volume label for volume "TestVolume1".
Wrote Start of Session label.


Is it possible that after I have done the weof with mt that bacula sees
the blank tape as unappendable in some way? It seems very happy to carry
on writing the tape and then verifying it at the end.

H


-----Original Message-----
From: John Drescher [mailto:drescherjm AT gmail DOT com] 
Sent: Thursday, April 30, 2009 1:39 PM
To: Hayden Katzenellenbogen; bacula-users
Subject: Re: [Bacula-users] Btape fill test fatal error WEOF

> Wrote blk_block=13025000, dev_blk_num=1000 VolBytes=840,268,735,488
> rate=68908.4 KB/s
> Wrote blk_block=13030000, dev_blk_num=6000 VolBytes=840,591,295,488
> rate=68906.6 KB/s
> Wrote blk_block=13035000, dev_blk_num=11000 VolBytes=840,913,855,488
> rate=68916.1 KB/s
> Wrote blk_block=13040000, dev_blk_num=500 VolBytes=841,236,415,488
> rate=68919.9 KB/s
> Wrote blk_block=13045000, dev_blk_num=5500 VolBytes=841,558,975,488
> rate=68906.8 KB/s
> Wrote blk_block=13050000, dev_blk_num=10500 VolBytes=841,881,535,488
> rate=68916.3 KB/s
> Wrote blk_block=13055000, dev_blk_num=15500 VolBytes=842,204,095,488
> rate=68925.8 KB/s
> 17:57:33 Flush block, write EOF
> Wrote blk_block=13060000, dev_blk_num=4000 VolBytes=842,526,655,488
> rate=68890.2 KB/s
> 29-Apr 17:57 btape JobId 0: End of Volume "TestVolume1" at 1225:6262
on
> device "Drive-1" (/dev/nst0). Write of 64512 bytes got -1.
> 29-Apr 17:57 btape JobId 0: Re-read of last block succeeded.
> btape: btape.c:2360 Last block at: 1225:6261 this_dev_block_num=6262
> btape: btape.c:2394 End of tape 1225:0.
VolumeCapacity=842,672,581,632.
> Write rate = 68873.9 KB/s
> 29-Apr 17:57 btape JobId 0: End of medium on Volume "TestVolume1"
> Bytes=842,672,581,632 Blocks=13,062,261 at 29-Apr-2009 17:57.
> 29-Apr 17:57 btape JobId 0: 3307 Issuing autochanger "unload slot 1,
> drive 0" command.
> 29-Apr 17:58 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0"
> command.
> 29-Apr 17:58 btape JobId 0: 3302 Autochanger "loaded? drive 0",
result:
> nothing loaded.
> 29-Apr 17:58 btape JobId 0: 3304 Issuing autochanger "load slot 2,
drive
> 0" command.
> 29-Apr 17:59 btape JobId 0: 3305 Autochanger "load slot 2, drive 0",
> status is OK.
> 29-Apr 17:59 btape: Fatal Error at dev.c:1705 because:
> dev.c:1704 Attempt to WEOF on non-appendable Volume

My guess is bacula is trying to write to the tape before it is done
loading. You may need to modify the mtx-changer to ensure the script
does not finish before the tape is fully loaded in the drive.

> Wrote Volume label for volume "TestVolume2".
> 29-Apr 17:59 btape JobId 0: Wrote label to prelabeled Volume
> "TestVolume2" on device "Drive-1" (/dev/nst0)
> 29-Apr 17:59 btape JobId 0: New volume "TestVolume2" mounted on device
> "Drive-1" (/dev/nst0) at 29-Apr-2009 17:59.
> Done writing 0 records ...
> Wrote End of Session label.
> Wrote state file last_block_num1=6261 last_block_num2=11
>

John

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
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>