[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CP: I/O error

From: Bob Proulx
Subject: Re: CP: I/O error
Date: Tue, 9 Apr 2002 22:21:53 -0600

> I am getting the following message when I attempt to copy a file from a CD
> to my Linux box.
> cp: reading '/mnt/cdrom/unix/data/data.taz': Input/Output error

Ew, that looks bad.  I/O errors are reported by the operating system
to programs calling the read() system call.  Application programs
doesn't really have anything they can do about this.  The operating
system handles the reading from the device.  If the OS can't read the
device then it reports an error to the application and the application
reports it to you.  Errors during read are usually indications of bad
spots on the media.

If this failure was on your hard drive I would say backup what you
could quick because your hard drive is dying.  But since this is on a
CD which is "removable media" it is only a temporary condition for the
device.  But it might be permanent for the media if it has a corrupted
data section.  On a CD that usually means surface damage.  But it may
also be corrupted bits even on a new and unused CD.  Mass produced CDs
are mechanically pressed into the surface.  (Which I still find
amazing.)  In recent years the reliability has been really good.  But
when CD's were introduced up to 30% of them had defects.  This was
only acceptable because in music that error will not be noticed by
your ear.

> We are running Redhat v. 7.2, and the file I'm trying to copy is about
> 10.5MB in size.  I'm wondering if this is a size limitation of some sort.

The GNU cp program can copy files up to the filesystem size limits.
On many systems this is up in the hundreds of gigabyte range.

> We've tried this on several CD's so that variable is eliminated.  Finally, I
> reduced the file size to about 6MB, and it copied without any
> problems.

How do you reduce the size of a file on a CD?

> Can you provide me some information on why I would be getting this
> message?  The only other factor we can consider is hardware.  All
> other files (.taz) on the CD copy without a problem.

It is possible that the data in that file on that particular CD is has
bad spots due to scratches or other physical damage to the CD.  If it
appears near the end of the file then that would explain why you can
copy the first 6MB of data.

Just for data gathering, try using other programs.  Here are a
selection.  Note that I expect these all to fail the same way as cp
fails since they are just calling the os read routine.

  cat /mnt/cdrom/unix/data/data.taz > /tmp/data.taz
  dd if=/mnt/cdrom/unix/data/data.taz of=/tmp/data.taz bs=32k

If it is just a bad spot on the CD but you actually get it read once
then save it because you will have your data.  You don't want to lose
it by overwriting it with another command.  Some CD readers work
better than others at reading troubled CDs.  But I think that is what
you meant when you said you had tried difference CDs already.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]