LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-11-2006, 05:45 AM   #1
Alkisx
Member
 
Registered: Apr 2006
Location: Greece
Distribution: Slackware
Posts: 74

Rep: Reputation: 16
tar on /dev/st0 input/output error


Hello there,

I am trying to do a backup on my tape drive. I am playing on about two weeks with tar on /dev/st0 but still not managed to do a successfull backup. I use DDS-3 tapes (12/24 GB).

The problem seems to be (I guess) that somehow the system (mt?) cannot see when the tape ends, and it tries to continue copying data, ending in an input/output error.

I managed to take a backup once, using also multiple volumes mode, but it only finished without errors by specifying file sizes with the -L option and giving file chunks of 11GB instead of 12GB just to be sure. But never get to restore that. trying to restore with the same options from backup or not, ends up with also an input/output error.

an example of what I am trying to do with tar:

tar -cMv -L 11000000 -f /dev/st0 /home/backup

where backup is a directory where I first copy what I need to get on tapes (also tried without -L).

I am using Slackware 10.2 with a 2.6.15.3 kernel now, and tried also with some 2.6.11.xx kernels and the default 2.4.31 that comes by default with slackware 10.2.

My tape device is a scsi Compaq SDT-9000.

My mt -f /dev/st0 status (with a loaded tape) is:

SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x25 (DDS-3).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

After searching the net it seems that people do backups/restores fine using tar and with multiple volumes, without the need specify file chunks, which either way didn't work for me.

Just to note, I cleaned the tape head using a clean cartridge. Also the tape device works perfect on a windows NT 4,2000 and xp where I tested it, and completed avery backup/restore 100% successfull.
Just to be sure that the device is working, its head is clean and my tapes are in good condition.

Tried also bacula and tapeware with similar failure results.

Any help? I tried everything I could play with and everything I found from net. Always get the same input/output error under Linux.
 
Old 04-11-2006, 09:37 PM   #2
wylie1001
Member
 
Registered: Jul 2002
Location: USA
Distribution: Slackware 10.2
Posts: 53

Rep: Reputation: 15
Hi,
I use a tape backup and it works good just at times it seems if there is to much to copy I get the error messages like you get. It seems to me that there is not enough tape to copy all the data. here are examples off my website as what I use hope it helps out somewhat. tar -f /dev/st0 erase this will erase your tape.

tar -xvf /dev/st0 this will get all the files off the tape to which ever directory you are in.

tar -cjvjpf /dev/st0 /boot /root /etc /usr .... will copy the four directory's and do it in a bzip2 copy, to your tape.

tar -xvf filename.tar will recover a file from your tape, you need to know the right file name here.

tar -tvf /dev/st0 will check the tape list it out for you.

Tape sizes - 60Meter DDS-1 1.3 Gig. 90Meter DDS-1 2.0 Gig. 120Meter DDS-2 4.0 Gig. 125Meter DDS-3 12.0 Gig.

Rick
 
Old 04-12-2006, 06:05 AM   #3
mdarby
Member
 
Registered: Nov 2004
Location: Columbus, Ohio
Distribution: Slackware-Current / Debian
Posts: 795

Rep: Reputation: 30
When I copy too much data to a tape, I too get an Input/Output Error. I guess you have to check your data size before copying.
 
Old 04-13-2006, 06:16 AM   #4
Alkisx
Member
 
Registered: Apr 2006
Location: Greece
Distribution: Slackware
Posts: 74

Original Poster
Rep: Reputation: 16
About the tape sizes, as I said, are DDS-3, which means 12GB uncompressed. I seems I cannot backup more than 4GB if I won't set a file chunk size on tar (as explained on the thread start).

I got some new DDS-3 tapes to do some tests. I create a tar file just a bit bigger than 2GB. the backup finished successfull and I was able to restore it also with success. Then I tried backing up a tar file a little bigger than 4GB. After some time I had that known well input/output error. I thought There was a problem with the 4GB file sizes, although there is no such limit on my system for a long time. So just to be sure, I had a few iso cd images in my disc and tried to backup the directory they where in, directly to my tape. The directory's total size was 4.6GB, having iso images no more than 600MB each. But after about some time during the backup process I had again that input/output error!!!

Because the tape device is of variable block size I will now try setting a specific block size to the tape and see what will happen. I will let you know of the results.

Thank you for your help.
 
Old 04-17-2006, 06:50 AM   #5
Alkisx
Member
 
Registered: Apr 2006
Location: Greece
Distribution: Slackware
Posts: 74

Original Poster
Rep: Reputation: 16
No luck...

Again the same input/output error. Also made some tests with mtx, everything looks fine as of the check of drive and tape information.

Still tar cannot write to tape more than 4GB data, as a big file, or mutltiple ones.

There is nothing left to do I think. It just doesn't work.

Any help out there?
 
Old 04-17-2006, 11:18 AM   #6
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,499
Blog Entries: 2

Rep: Reputation: 68
Did you have tried with another program ? What about "dd if=/dev/zero of=/dev/st0" ? May be you get a different error message which could help you to point where the problem is....just an idea.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dd: reading `/dev/cdrom': Input/output error jimdaworm Linux - Software 46 10-25-2006 08:43 PM
/dev/st0 : Input/Output error sharonenoch Linux - Hardware 1 02-10-2006 12:44 PM
/dev/hdc : Input/output error tulip4heaven Linux - Software 3 04-27-2005 12:03 PM
input/output dev/hda error meira Red Hat 2 09-01-2004 08:31 AM
/dev/hdd input/output error... Linux~Powered Linux - Software 8 02-17-2004 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration