LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-25-2008, 10:01 AM   #1
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
Cannot read tar backup on CD-R


OS: Red Hat Enterprise Linux 5

I have created a 'tar' backup on a CD-R using Lone-tar. However when I try to read the directory (tar tvf /dev/hda), it gets almost all the way through the volume but then displays the error:

tar: /dev/hda: Cannot read: Input/output error

This error is repeated many times.

The interesting thing is that if I take the CD-R to an old SCO 5.0.5 system it is able to read the entire volume (tar tvf /dev/cd0) with no errors. I was even able to extract the last file on the volume.

It is almost as if linux is reading past the end of the archive, getting an error, but not processing the last data found.


Any suggestions?
 
Old 04-25-2008, 10:43 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Have you tried GUI tools such as Archiver to try to read the tar file?
 
Old 04-25-2008, 10:49 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Don't you have a file on the CD disc?

The input should be a tar file and not a device.
 
Old 04-25-2008, 11:01 AM   #4
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
I have not used Archiver. Is it Applications -> Accessories -> Archive Manager? I don't see how to access the CD-R in this program.
 
Old 04-25-2008, 11:08 AM   #5
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
jschiwal - The CD-R is not mountable, it is being used as if it was a tape. Most of the CD is accessible and the whole CD is accessible under SCO Open Enterprise (5.0.5). It is just the end of the archive that causes the error.
 
Old 04-25-2008, 11:19 AM   #6
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
I used dd to transfer the data to the hard disk (dd if=/dev/hda of=/tmp/tempCD). This command also displayed errors, however, tar tvf /tmp/tempCD results in the same output as tar tvf /dev/hda.
 
Old 04-25-2008, 11:46 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
If copying the image resulted in errors, you may have a defective disc or the drive may have problems.
 
Old 04-25-2008, 12:01 PM   #8
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
jschiwal - I think it just does not know when to stop. Unfortunately, it ignores the last few files on the CD. I would not mind if it errored out after reading all the files on the CD.

I mentioned before that the CD is readable in SCO (all files and no errors). I am using the same physical drive to do the reading. SCO is running as a virtual machine under the Linux host OS. I have also taken the disk to another machine and read the CD using SCO. It seems to be the linux CD-ROM driver that is having the problem.
 
Old 04-25-2008, 07:59 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Was there more than 650MB of data on the disc? You might want to check the size of the image in your Solaris VM. I'm wondering if this image included an overburned part at the end and if the Linux driver doesn't handle this area. Check if there is kernel documentation for the Linux driver. Some cdrom drivers may have a .txt file in Documentation/cdrom of the kernel source. Also check the Lonetar settings if there is a mention of overburn and disable it if there is. This might prevent the problem in the future.

You might try a test to see if the backups produced are compatible with gnu's tar. Create a smaller backup using the same program but backup up to a file share. Then test the tar file in Linux using the tar command. Verify that the Lonetar program is compatible with gnu's tar program. If it is then I does look like a driver issue.
 
Old 04-28-2008, 01:28 PM   #10
hbirdguy
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
jschiwal - there was about 250mb of data in the image, so overburn is not an issue. When I added other files to the end of the backup, I was able to access all the needed files. It looks like I will just need to provide my own padding. It still errors out when tar (or lone-tar) reads to the end, but all the files are accessible. I believe that the problem is in reading the disk rather than writing, since I can read it using SCO Unix.

It would be nice if it were cleaner, but for now this will do.

I would not know where to look for the cdrom driver in linux.


Thanks for your help!
 
  


Reply

Tags
cdr, tar


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Backup Script Using tar - Error "file changed as we read it" 3rods Linux - Software 6 03-08-2014 06:18 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 03:53 AM
Tar backup TheRealDeal Linux - General 7 02-08-2005 04:25 PM
Using tar for backup. TheRealDeal Linux - General 2 08-11-2004 12:46 AM
tar as backup imsajjadali Red Hat 4 02-07-2004 04:46 PM


All times are GMT -5. The time now is 12:41 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration