4
1
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.
4
1
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.
5
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).
1I have had this for days! It definitely is a faulty disk. This error usually goes hand-in-hand with the Bad Sector
error. You don't have to replace your disk. Just do a full backup, reinstall your OS (this will ostracize bad sectors), restore from backup. You're golden. – iGbanam – 2013-04-13T17:15:55.160
4
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.
3
The only time I have ever seen cp giving this error was when an iso image was mounted twice, eg: /dev/sr0 mounted on /mnt AND /dev/loop0 mounted on /mnt too. In this scenario, I think cp gets some recursion it can't handle. For me, unmounting both loop0 and sr0, then running mount -o loop /dev/sr0 /mnt again fixed it (done by root or sudo user).
This recent bug report started out with a similar error. It has been fixed in the meantime and removed the problem for me. Good luck to you.
– JJD – 2012-09-05T22:52:16.117