Hello all!
I stuck in last week's disussion about pulling the plug in linux and now I have like a
problem and questions and stuff:
Our embedded system is running on a flash ide drive and the following problems must
be solved:
* since it is a flashdisk, I don't want to write to it more than once every 20-30
minutes. Still the application program should be able to use it all the time.
* it should be capable of doing a pull-the-plug shutdown without any large risc of
loosing data.
My idea is (or was) as follows:
I rewrote /sbin/update (bdflush) to do the following:
1 mount the disc readwriteable
2 do the sync or bdflush or whatever
3 mount the disc readonly
I set the time to like 20 minutes.
It doesn't work very well.
Is there a way to trick mount so that altohugh the disk is
mounted ro it is possible to "write" to it (that means of course in my case write to
the mem cache.)? Is mount only depending on the info in /etc/mtab or how does it check
the drives if they are ro or rw??
If I get this to work I guess most of the problems above are solved. The only case
where a shut down would be riscy is during the time update is writing. Otherwise it's
just a loss of 20 min data.
best regards /
magnus oerstroem
ps) thanks for the help last time. The disc is working smoothly now.