On Friday, 14 December 2007 13:05:58 -0500, Michael Galloway wrote: > > I've performed the btape test according to Bacula's manual but I got > > a message saying Bacula doen't found the medium.
> > [...]
> looks like either the changer script or mtx cannot get a tape from the
> library into the drive. i'd back up a step or two and make sure mtx
> works as you would expect (i.e., can mtx -f /dev/sg2 next load the
> next tape, etc). if that work as you expect it should, load a tape
> into the drive with mtx, then run btape test without using the
> autochanger part and make sure that it runs without error. then we can
> work on putting the autochanger part back in.
Hi Michael. I've been modified the mtx-changer script, increasing the
sleep time in the load case section since I got the following error
mentioned in a previous message of this thread:
3912 Failed to label Volume: ERR=dev.c:678 Rewind error on "Drive-1"
(/dev/nst0). ERR=Error de entrada/salida.
------------------------------------------------------
load)
debug "Doing mtx -f $ctl load $slot $drive"
${MTX} -f $ctl load $slot $drive
rtn=$?
#
# Increase the sleep time if you have a slow device
# or remove the sleep and add the following:
# wait_for_drive $device
# sleep 15
sleep 60
exit $rtn
;;
------------------------------------------------------
Reading the "Autochanger Resource" section of Bacula's manual,
subsection "Testing Autochanger and Adapting mtx-changer script", I
found this:
If Bacula complains "Rewind error on /dev/nst0. ERR=Input/output error."
you most likely need more sleep time in your mtx-changer before
returning to Bacula after a load command has been completed.
Then, I ran a new test using btape:
------------------------------------------------------
sparky:/etc/bacula# btape -c /etc/bacula/bacula-sd.conf /dev/nst0
Tape block granularity is 1024 bytes.
btape: butil.c:272 Using device: "/dev/nst0" for writing.
14-Dec 17:01 btape: 3301 Issuing autochanger "loaded drive 0" command.
14-Dec 17:01 btape: 3302 Autochanger "loaded drive 0", result is Slot 4.
14-Dec 17:01 btape: 3301 Issuing autochanger "loaded drive 0" command.
14-Dec 17:01 btape: 3302 Autochanger "loaded drive 0", result is Slot 4.
btape: btape.c:338 open device "Drive-1" (/dev/nst0): OK
*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 ...
btape: btape.c:795 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:811 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:820 Rewind OK.
1000 blocks re-read correctly.
Got EOF on tape.
1000 blocks re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===
=== Write, rewind, and position test ===
I'm going to write 1000 records and an EOF
then write 1000 records and an EOF, then rewind,
and position to a few blocks and verify that it is correct.
This is an *essential* feature ...
btape: btape.c:907 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:923 Wrote 1000 blocks of 64412 bytes.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:932 Rewind OK.
Reposition to file:block 0:4
Block 5 re-read correctly.
Reposition to file:block 0:200
Block 201 re-read correctly.
Reposition to file:block 0:999
Block 1000 re-read correctly.
Reposition to file:block 1:0
Block 1001 re-read correctly.
Reposition to file:block 1:600
Block 1601 re-read correctly.
Reposition to file:block 1:999
Block 2000 re-read correctly.
=== Test Succeeded. End Write, rewind, and re-read test ===
=== 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:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
14-Dec 17:02 btape: 3301 Issuing autochanger "loaded drive 0" command.
14-Dec 17:02 btape: 3302 Autochanger "loaded drive 0", result is Slot 4.
btape: btape.c:338 open device "Drive-1" (/dev/nst0): OK
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1061 Now moving to end of medium.
btape: btape.c:490 Moved to end of medium.
We should be in file 3. I am at file 3. This is correct!
Now the important part, I am going to attempt to append to the tape.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
Done appending, there should be no I/O errors
Doing Bacula scan of blocks:
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
End scanning the tape.
We should be in file 4. I am at file 4. This is correct!
The above Bacula scan should have output identical to what follows.
Please double check it ...
=== Sample correct output ===
1 block of 64448 bytes in file 1
End of File mark.
2 blocks of 64448 bytes in file 2
End of File mark.
3 blocks of 64448 bytes in file 3
End of File mark.
1 block of 64448 bytes in file 4
End of File mark.
Total files=4, blocks=7, bytes = 451,136
=== End sample correct output ===
If the above scan output is not identical to the
sample output, you MUST correct the problem
or Bacula will not be able to write multiple Jobs to
the tape.
=== Write, backup, and re-read test ===
I'm going to write three records and an EOF
then backup over the EOF and re-read the last record.
Bacula does this after writing the last block on the
tape to verify that the block was written correctly.
This is not an *essential* feature ...
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:674 Wrote first record of 64412 bytes.
btape: btape.c:685 Wrote second record of 64412 bytes.
btape: btape.c:696 Wrote third record of 64412 bytes.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:712 Backspaced over EOF OK.
btape: btape.c:717 Backspace record OK.
btape: btape.c:735
Block re-read correct. Test succeeded!
=== End Write, backup, and re-read test ===
=== Forward space files test ===
This test is essential to Bacula.
I'm going to write five files then test forward spacing
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:1531 Wrote one record of 64412 bytes.
btape: btape.c:1533 Wrote block to device.
btape: btape.c:469 Wrote 1 EOF to "Drive-1" (/dev/nst0)
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1276 Now forward spacing 1 file.
We should be in file 1. I am at file 1. This is correct!
btape: btape.c:1288 Now forward spacing 2 files.
We should be in file 3. I am at file 3. This is correct!
btape: btape.c:438 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1301 Now forward spacing 4 files.
We should be in file 4. I am at file 4. This is correct!
btape: btape.c:1319 Now forward spacing 1 more file.
We should be in file 5. I am at file 5. This is correct!
=== End Forward space files test ===
Ah, I see you have an autochanger configured.
To test the autochanger you must have a blank tape
that I can write on in Slot 1.
Do you wish to continue with the Autochanger test? (y/n): y
=== Autochanger test ===
3301 Issuing autochanger "loaded" command.
Slot 4 loaded. I am going to unload it.
3302 Issuing autochanger "unload 4 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
3303 Autochanger "load 1 0" status is OK.
14-Dec 17:05 btape: 3301 Issuing autochanger "loaded drive 0" command.
14-Dec 17:05 btape: 3302 Autochanger "loaded drive 0", result is Slot 1.
btape: btape.c:338 open device "Drive-1" (/dev/nst0): OK
btape: btape.c:1206 Rewound "Drive-1" (/dev/nst0)
btape: btape.c:1213 Wrote EOF to "Drive-1" (/dev/nst0)
The test autochanger worked!!
------------------------------------------------------
All the tests seems finished successfully!!
Well, it's a good step in the correct direction :-)
Now I'm trying to perform backups operations. I've noticed when I try
label a volume, Bacula uses the slot 0 and then it causes a mount error.
------------------------------------------------------
*label
Automatically selected Storage: DLTDrive
Enter new Volume name: DLT-15Dic07
Defined Pools:
1: Default
2: SundayPool
Select the Pool (1-2): 1
Connecting to Storage daemon DLTDrive at sparky.educ.gov.ar:9103 ...
Sending label command for Volume "DLT-15Dic07" Slot 0 ...
Invalid slot=0 defined, cannot autoload Volume.
3301 Issuing autochanger "loaded drive 0" command.
3302 Autochanger "loaded drive 0", result: nothing loaded.
3301 Issuing autochanger "loaded drive 0" command.
3302 Autochanger "loaded drive 0", result: nothing loaded.
3912 Failed to label Volume: ERR=dev.c:678 Rewind error on "Drive-1"
(/dev/nst0). ERR=No medium found.
Label command failed for Volume DLT-15Dic07.
Do not forget to mount the drive!!!
------------------------------------------------------
I have seen some cases where Bacula asks on the slot for the volume. How
I can obtain this behavior?
Thanks for your response.
Regards,
Daniel
--
Daniel Bareiro - System Administrator
Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Etch - Linux user #188.598
signature.asc
Description: Digital signature
------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________ Bacula-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-users
