Dual filesystem handling
Rob Hulsebos
hulsebos at philmds.UUCP
Fri Sep 23 23:32:24 AEST 1988
Hello netland.
I'm involved in the development of an application which is very concerned
about the integrity and survivability of its files after a system-crash.
In order to do this, it writes its data in two files. Each file is on
a separate disk on a separate disk-controller. This allows the application
to continue working if one of the disks crashes.
The problems starts arising if the system crashes with a 'panic' or so. Due
to the (in)famous Unix buffer cache, file #1 can be more up-to-date than
file #2, or vice-versa.
The application must then make sure that both files become equivalent again,
by determining which of the two is the most up-to-date and then transferring
records to make the other file the equivalent of the first.
If you give this some thought, it is far more complex than it seems at a
first look. The 'sync(2)' system-call is useless because it is
asynchronous. The 'fsync(2)' system-call is useless too because it only
works on one file; when called twice for the both files it is not an
atomic operation, etc. etc.
I would like to know if there is anybody around who has experience with this
subject, or can point me to any solutions, or perhaps there is even a
software-package which can handle this problem ? I know that Informix has
a package (Turbo-Informix) which does what I want, so a solution to my
problem seems to be possible.
Thanks in advance.
-------------------------------------------------------+----------------------
R.A. Hulsebos, Philips I&E, Eindhoven, The Netherlands | phone: +31-40-785723
...!mcvax!philmds!hulsebos | fax: +31-40-786114
More information about the Comp.unix.questions
mailing list