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 have a buildroot generated embedded linux system (x-86 geode processor) using an initramfs but with /var and /etc mounted onto a compact flash device using the default mount options specified in fstab. My filesystems are ext3.

I run a controller application on this system which generates some custom activity logging from time to time to files created on the /var partition. Recently one of my embedded devices was reporting that it could not open the log file as the /var partition was a read only partition. I verified with using mount. My question is how on earth could this happen? My controller application certainly does not do this, but are there any other processes that run on a linux system that could request a remount of /var as read only?

My devices do run in noisy industrial environments so is it possible that this could be come kind of system corruption due to EM interference?

This has never happened before over several hundred hours of testing but it is a critical error that I need to find a cause for so any suggestions as to what could have caused this or how to ascertain what caused it are very welcome.

EDIT In light of the criticism this question has received, I include the relevant line of fstab for mounting the /var partition:

/dev/sda3   /var   ext3   defaults 0  3

and the line within the inittab function responsible for mounting

null::sysinit:/bin/mount -a

also here is the output line from /proc/mounts relevant to /var

/dev/sda3 /var ext3 rw,relatime,errors=continue,user_xattr,scl,barrier=1,data=writeback 0 0

I should probably also mention that the system uses busybox init system.

share|improve this question
    
Linux is just kernel, we have no magic ball to understand how your ram disk was build, configured and how it works. This is like 'I use Linux and it does not work, please help me...'. –  Jiri Xichtkniha Oct 24 '13 at 9:58
    
probably are mounted with the option errors=remount-ro. ext3 isn't the best fs for flash devices, see jffs/jffs2, yaffs2 or ubifs –  Alex Oct 24 '13 at 10:00
    
@JiriXichtkniha And who would have thought that a site such as this was the place to ask for advice and help when people who use linux have problems. Not you clearly. –  mathematician1975 Oct 24 '13 at 10:03
    
@Alex Thanks for this suggestion - this gives me a place to start –  mathematician1975 Oct 24 '13 at 10:03
    
Sorry but to ask for help needs homework of the one asking. Where is fstab, mount, startup script...? I see you have no self-reflection on what you wrote. –  Jiri Xichtkniha Oct 24 '13 at 10:06
show 4 more comments

1 Answer

Two things to consider:

The reason must be in a log file somewhere. A tricky one can be 'dmesg'. See if the embedded system has the 'dmesg' command. If not, look for a log file of the same name in /var or /tmp.

Also (stab in the dark) but does the SD card have any writable space left? This is a little trickier than what is displayed with 'df'. See: http://raspberrypi.stackexchange.com/questions/169/how-can-i-extend-the-life-of-my-sd-card

From above: "If you write to it [an sdcard] at full speed the whole time day and night 24/7- a 16gb will last about 30days."

share|improve this answer
add comment

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.