[Dovecot] Best filesystem?
Timo Sirainen
tss at iki.fi
Mon Jan 31 01:27:13 EET 2011
On Sun, 2011-01-30 at 17:07 -0600, Stan Hoeppner wrote:
> > 0 byte files != NULL bytes in files. My guess is it's the same problem
> > as described in
> > http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/
>
> Yes, very similar Timo.
>
> To be clear, for any subscribers who haven't followed all of the various
> filesystem and data security threads, with any modern *nix system, you WILL lose
> data when power fails. How much depends on how many writes to disk were in
> flight when the power failed, and how one has their RAID controller and
> inside-the-disk caches configured, whether using barriers, etc.
But it's not just about how much data is lost. It's also about if any
existing data is unexpectedly lost. That's why people were complaining
about ext4, because suddenly when renaming a file over another might
lose both the old and the new file's contents if power got lost, while
with ext3 either the old or the new data stayed behind. Then they did
all kinds of things to ext4 to fix this / make it less likely.
I don't know how likely that is with XFS. Probably one way to test would
be something like:
1. Create 100 files of 1 MB size.
2. sync
3. Create a new file of 2 MB size & rename() it over a file created in
step 1.
4. Repeat 3 until all files are replaced
5. Kill the power immediately after done
Then you can compare filesystems based on how many files there are whose
size or content doesn't match.
More information about the dovecot
mailing list