Fileystem corruption read-only mode

Started by ricar, September 30, 2016, 12:00:18 PM

Previous topic - Next topic

ricar

Hello, I have a question regarding filesystem corruption.

I have been using  A20-Olinuxino LIME board, with a Linux Debian image booted from NAND.

I know that filesystem corruption can take place when power goes down abruptly. In order to avoid this I decided to mount linux rootfs in read-only mode, with the following fstab settings:

/dev/nandc    /   ext4   ro,relatime,data=ordered    0   0


The problem is that even with this configuration I have encountered filesystem corruption in 2 case (2 different boards).
In the first case  during  boot I found this messages:

'/dev/nandc contains a file system with errors, check forced.....
/dev/nandc: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only mode. ..'

In the second case my device booted correctly but I can't start Apache due to this error "No apache MPM package installed" ,but It works fine until yesterday. Sending a e2fsck -yf /dev/nandc command I found filesystem errors that prevent Apache to use the package mentioned in the error.

Why I encountered filesystem corruption even with filesystem read only?



Thank you.