I've been storing some files on a MicroSD formatted to ext4 that I connect via USB. I tried to move a directory in it to an external hard drive, and I got

mv: error reading ‘/mnt/sd/Directory/xyz.mp3’: Input/output error.

I tried to chmod -R 777 the mount point of the sd (as root), and I got

chmod: changing permissions of ‘sd/Directory/xyz.mp3’: Read-only file system.

I never did anything to make the filesystem read-only, and I've had no trouble with it before. The only thing that I can think of that's changed is the SD is usually /dev/sdb1, and it was /dev/sdc1 this time.

Running Arch Linux in Virtualbox on a Windows 7 host.

  • 1
    This is probably the first sign that the SD card is dying. You can try to zero out the drive and try again. Keep an eye on the syslog. If the IO errors occur again, I wouldn't trust the card anymore and rather buy a new one. – Marco Jun 13 '13 at 17:12
  • @Marco - not necessarily. I've had problems before with USB storage devices becoming read-only for a variety of reasons. Often times a reboot would fix the issue, which seemed to be with either the software mounting it or an underlying driver. – slm Jun 13 '13 at 17:41
  • can you share dmesg logs. – Raza Jun 13 '13 at 19:46

The default action of any mounted device when getting a serious I/O error, unless changed at mount time, is to drop out from its normal R/W mode to Read ONLY mode. It does this to allow you to attempt to access what you are doing and also to prevent any further serious damage to the device filesystem formatting.

You can check your logs to detemine what the error specifically is usually.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.