Question about Cyrus, ext3, and Linux kernel 2.4.18 bug
Henrique de Moraes Holschuh
hmh at debian.org
Wed Apr 16 18:32:42 EDT 2003
On Wed, 16 Apr 2003, Michael Fair wrote:
> > Data journals are protection against badly written programs. Most people
> > them to try to get a bit more performance in certain configurations, not
> > a dataloss protection.
> I do not consider programs that do:
> 1) copy main file to temp
> 2) modify temp
> 3) replace main file
I do. They must call fsync before doing (3).
> If after step 3, but before the data actually makes it to
> the disk, the server should crash, then your main file will
> end up empty. While doing an fsync() reduces the window
Not if fsync is called. (3) can only happen after the fsync completes, and
in any sane fs that means both data _and_ metadata made it to the disk.
(3) is just metadata operation, and that's journaled.
> Putting the spool directory in "sync" mode does alleviate
> these problems as all data is immediately flushed to disk.
> But then this omewhat removes the benefits of having a
> journaled FS to begin with.
All email software worth something calls fsync on every critical file, after
every critical operation, thus ALREADY operating in "close to sync mount
mode". That includes Cyrus and postfix, at the very least.
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
More information about the Info-cyrus