[CLUE-Tech] Help w/SCSI tape problem?

Jim Ockers ockers at ockers.net
Fri May 9 13:02:27 MDT 2003


Carl:

I would like to see the results of your tests when applied to the /dev/st0
device.

Here is what I want you to do to back up the file.  Please do this stuff
in exactly this order:

mt -f /dev/st0 rewind
mt -f /dev/st0 reten
mt -f /dev/st0 erase
mt -f /dev/st0 rewind
tar cvf /dev/st0 filename.to.back.up
mt -f /dev/st0 rewind
tar tvf /dev/st0
mt -f /dev/st0 rewind
cd /test.directory; tar xvf /dev/st0

I am not sure why you are using the /dev/nst0 device which is the nonrewinding
device.  Is there something special about your hardware that you feel you
should use that device nodename?  I have always had the expected results when 
just using the /dev/st0 device.  I haven't had any need for the /dev/nst0 
device.

I don't think you have to use dd to specify the blocksize, since it's
generally worked for me (albeit slowly) just using whatever the default
blocksize is.  Also you don't have to use dd, why not just use tar?  After
all tar is the Tape ARchive program.  Perhaps your forcing of the blocksize
is causing something to omit a few bits of data that are outside a block
boundary, or something.

I'm not saying your stuff shouldn't work but there is either a problem with
your drive, your tape, or some combination of that and the way you are
using them.  More information about your hardware might help too.  Is it a
nice Sony or HP DAT drive?  Or is it an IDE TR3 drive under IDE-SCSI
emulation?  Or something else?  How new is your tape?

There are lots of people who do tape stuff with Linux, I'm sure.  Generally
I've found that it works as expected.  Too well, in fact, sometimes - why do
I even bother keeping those files from 1986 anyway?  The tape functionality 
has never failed me so the data persists..  :)

Regards,
Jim

Carl Gibbons wrote:
> 
> I didn't get any results the first, time, so I'd like to try one more 
> time. Perhaps nobody reading this mailing list does any tape stuff with 
> Linux?
> 
> I tried it again with a text file (/etc/termcap), and it's the *end* of 
> the file that I'm missing when I try to read it back from the tape:
> 
> $ sudo dd bs=512 if=/etc/termcap of=/dev/nst0
> dd: writing `/dev/nst0': Invalid argument
> 1440+1 records in
> 1440+0 records out
> $ sudo mt -f /dev/nst0 rewind
> $ sudo dd bs=512 if=/dev/nst0 of=image
> 3397+0 records in
> 3397+0 records out
> $ diff /etc/termcap image
> Warning: missing newline at end of file termcap
> 17095,17104c17095
> < # The following sets edit modes for GNU EMACS.
> < # Local Variables:
> < # fill-prefix:"\t"
> < # fill-column:75
> < # comment-column:0
> < # comment-start-skip:"^#+"
> < # comment-start:"# "
> < # compile-command:"tic -c terminfo.master"
> < # End:
> < ######## SHANTIH!  SHANTIH!  SHANTIH!
> ---
> > # 
> 
> Insights appreciated!  -Carl
> 
> Carl Gibbons wrote:
> 
> >   I can see the tape drive and tape:
> >
> >$ sudo mt -f /dev/nst0 status
> >SCSI 2 tape drive:
> >File number=0, block number=0, partition=0.
> >Tape block size 512 bytes. Density code 0x8c (EXB-8505 compressed).
> >Soft error count since last status=0
> >General status bits on (41010000):
> > BOT ONLINE IM_REP_EN
> >
> >   I can write to the tape, but I get an error:
> >
> >$ sudo dd bs=512 if=liquidwar-5.5.9-1.i386.rpm of=/dev/nst0
> >dd: writing `/dev/nst0': Invalid argument
> >3397+1 records in
> >3397+0 records out
> >
> >   I can try to read what I wrote to the tape:
> >
> >$ sudo mt -f /dev/nst0 rewind
> >$ sudo dd bs=512 if=/dev/nst0 of=image
> >3397+0 records in
> >3397+0 records out
> >
> >   But what I read back isn't the same size as what I wrote:
> >
> >$ ls -l
> >-rw-r--r--    1 root     root      1739264 Apr 25 15:55 image
> >-rw-------    1 johndoe  johndoe   1739593 Apr 24 15:08 liquidwar-5.5.9-1.i386.rpm
> >
> >   Why is this happening? How do I fix this problem?
> >
> >-- Carl Gibbons, cgibbons at du.edu
> >  
> >
> 
> _______________________________________________
> CLUE-Tech mailing list
> CLUE-Tech at clue.denver.co.us
> http://clue.denver.co.us/mailman/listinfo/clue-tech
> 


-- 
Jim Ockers, P.Eng. (ockers at ockers.net)
Contact info: please see http://www.ockers.net/



More information about the clue-tech mailing list