cp: reading `filename': Input/output error WHY?

I wish to know what could be the possible cases for this error:

cp: reading `filename': Input/output error

I am getting this message when I am trying to copy a big file of around 50MB.


Solution 1:

The most likely problem is a faulty disk, unless the disk is mounted over a network, in that case, I believe network issues could also cause that.

It is likely that the size impact is statistical, especially in the network case (i.e. the chance of failure increases with size because more operations are involved and each has a chance to fail).

Solution 2:

Try dmesg or the syslog to see if the kernel complains about something that could be related to this. The cp command only gets an integer error number of the underlying system calls, and therefore the error messages are sometimes not very detailed.