Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
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

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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