LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Problem with SCSI DDS3 tape drive (https://www.linuxquestions.org/questions/linux-general-1/problem-with-scsi-dds3-tape-drive-25099/)

greenhornet 07-05-2002 05:01 AM

Problem with SCSI DDS3 tape drive
 
Hi All,

I have a tape drive on /dev/nst0 which I've been tarring my filesystems two for over a year now.

The tar command I use to write to tape is
tar -cvpf /dev/nst0 --label="Backup:`date '+%d-%B-%Y'`" --directory / --exclude=mnt --exclude=proc --exclude=dev --exclude=tmp --exclude=root . > /tmp/Backup-`date '+%d-%B-%Y'`-Log

Which writes the tar file to the tape and puts a log file in /tmp. After that I rewind the tape with
mt -f /dev/nst0 rewind
and take it offline with
mt -f /dev/nst0 offline

This has been working fine for ages however when I try to dothis now I ge the error
tar: /dev/nst0: Wrote only 0 of 10240 bytes
tar: Error is not recoverable: exiting now

From looking at the log file this tar command generates sometimes this happens after only a few files, sometimes after almost the whole backup is written, however it invariably always happens and something is not backed up. Oh the other thing is it always says 10240 bytes? Mabye this is signitficant?

Can anyone fill me in on what this means. Is the drive bad or is this something to do with a configuration perhaps? Each time I try to backup its on a different tape so Idont think its dodgy tapes.

thanks heaps for reading this far !!

Mik 07-05-2002 08:51 AM

The commands look fine as long as you position the tape at the right location before you start archiving.

The 10240 is just the default blocksize. If you look at the tar man page you will see the default is 20 blocks (block is 512 bytes).

Have you tried just archiving just one file to make sure reading and writing to the tape works. You could do something like:

mt -f /dev/nst0 rewind #rewind tape
mt -f /dev/st0 weof #quick erase and rewind when done
tar cvf /dev/st0 /etc/services #archive /etc/services and rewind
tar tvf /dev/st0 #display contents of the archive


All times are GMT -5. The time now is 04:44 AM.