Bacula-users

Re: [Bacula-users] 124t users?

2011-02-28 18:49:28
Subject: Re: [Bacula-users] 124t users?
From: Seth Bardash <seth AT integratedsolutions DOT org>
To: bacula-users AT lists.sourceforge DOT net
Date: Mon, 28 Feb 2011 16:28:58 -0700
On 2/28/2011 3:50 PM, Rory Campbell-Lange wrote:
> On 28/02/11, John Drescher (drescherjm AT gmail DOT com) wrote:
>> On Mon, Feb 28, 2011 at 5:33 PM, John Drescher<drescherjm AT gmail DOT com>  
>> wrote:
>>> On Mon, Feb 28, 2011 at 5:22 PM, Jeremiah D. Jester
>>> <jjest AT u.washington DOT edu>  wrote:
>>>> Here's my output..
>>>>
>>>> #test write.
>>>> [root@scrappy bacula]# mt -f /dev/nst0 rewind
>>>> [root@scrappy bacula]# mt -f /dev/nst0 weof
>>>> [root@scrappy bacula]# dd if=/dev/nst0 of=/dev/null bs=64512
>>>> dd: reading `/dev/nst0': Input/output error
>>>> 0+0 records in
>>>> 0+0 records out
>>>> 0 bytes (0 B) copied, 5.39927 seconds, 0.0 kB/s
>>>>
>>>> #/var/log/messages
>>>> Feb 28 14:17:46 scrappy kernel: st0: Failed to read 65532 byte block with 
>>>> 64512 byte transfer.
>>>>
>>> You will have to increase the block size since your tape was written
>>> with a larger block size.
>>>
>> Also this is the expected output since you did not write anything to
>> the tape after the weof. This was actually trying to read the tape not
>> write.
>
> John -- I'd be grateful for your comments on how best to do a dd based
> read and write test for LTO3 and LTO4 tapes. This seems like a fairly
> good way of narrowing down a drive or interconnect problem.
>
> Is something like the following correct?
>
>      mt -f /dev/nst0 rewind
>      dd if=/dev/sd<x>  of=/dev/nst0 bs=64512 count=10000 # about 300GB
>      mt -f /dev/nst0 rewind
>      dd if=/dev/nst0 of=/dev/null bs=64512
>
> Many thanks
> Rory
>

Rory and the list,

I have been lurking here for about 2 years but this is my first
post on this list. The following is something I use but I'm sure there
are better ways to do this. I would also be willing to share .conf files
if necessary.

We have a Tandberg Magnum 224 with an IBM LTO-4 Tape Drive.
The mtx commands are all in the bacula manual.
Here is a script I use to wipe a tape before labeling.


 > cat wipe_tape
#
# Wipe all header info from a tape
#
# WARNING: IT REALLY MAKES THE TAPE BLANK
#
cd /usr/local/bacula/bin

echo -n "Enter tape slot to wipe : "

read slotnumber

echo ""
echo "Here is a list of what is in the Tape Library by slot numbers: "
echo ""
./mtx-changer /dev/sg3 list 0 /dev/nst0 0
echo ""
echo "ARE YOU SURE???"
echo ""
echo " 10 second till I start, Hit Control-C to cancel"
echo ""
echo " About to wipe tape in slot number :  $slotnumber"
sleep 11
echo ""
./mtx-changer /dev/sg3 load $slotnumber /dev/nst0 0
mt -f /dev/st0 rewind
echo "Tape loaded, rewind complete"
dd if=/dev/zero bs=32768 count=5000 of=/dev/st0
mt -f /dev/st0 rewind
echo "tape wiped, rewound, writing eof mark"
mt -f /dev/st0 weof
mt -f /dev/st0 rewind
./mtx-changer /dev/sg3 unload $slotnumber /dev/nst0 0
echo "Done"



It works but you may want to change /dev/st0 to /dev/nst0 - ??

I also have a version to wipe multiple tapes in selected slots.
I can email that if you want.

Notes for the above:

1) Bacula not running when running this script.
2) My library mechanism is /dev/sg3 yours may be different
    or not present.
3) After a wipe, I start up Bacula and bconsole and run "label barcode"
    to set up all the tapes in the library for the correct volume pool.

Hope this helps...

BR

Seth Bardash

Integrated Solutions and Systems LLC
seth AT integratedsolutions DOT org

Failure cannot survive knowledge and perseverance!

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
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>