On 11/22/2013 12:41 PM, Clark Dunson
wrote:
Hi everybody;
We use a TS-7260 with 2.6.21, SDBoot, read-only root, and
read-write /var. We have about 160 earthquake sites
throughout the world and remotely administer them from our
central offices. We've been having kernels remount /var as
read-only more frequently these days, and are looking for a
better way to handle it, so ask the experts! Thank you.
I'm guessing you are getting corruption when someone unplugs the
power, then plugs in back in? I have had problems with that. What
about your setup has you mounting /var as read/write? Is that so
the O/S can write little pid files, etc, or are you writing your
earthquake data to /var? I have systems where the whole filesystem
is read only, then a tiny ram disk for /tmp/ and /var/tmp. That
works very well.
If you are writing data to it, I suggest keeping the card mounted
R/O most of the time, then when you have data to write go through a
cycle of:
- fsck, -y /dev/whatever/is/your/var
- mount /var -o remount,rw
- write data
- sync
- mount /var -o remount,ro
That keeps your filesystem clean. In the rare case where you lose
power right in the middle of that write cycle (call that "one in a
thousand", the next fsck will hopefully clean it up. Then actual
corruption should be "one in a million".
Just my 2 cents worth.
Joe
__._,_.___
__,_._,___
|
|