The Book of Postfix | Postfix - Einrichtung, Betrieb und Wartung | Comics | Gallery | (Amazon| ThinkGeek) wishlist | Donations | Impressum

Postfix on an ext3 filesystem

Recommended Setup

I usually use:
/dev/hda3 on /          type auto (rw,errors=remount-ro)
/dev/hda1 on /boot      type ext3 (rw)
/dev/hda6 on /var/spool type ext3 (rw,data=journal,noatime)
/dev/hda7 on /var/log   type ext3 (rw)

Warning

"Andrew Morton posted on the lkml, "In 2.4.20-pre5 an optimisation was made to the ext3 fsync function which can very easily cause file data corruption at unmount time". This bug only affects people using ext3 in the uncommon "data=journal" mode, or files operating under "chattr -j", and does not affect the 2.5 series of kernels.

Andrew went on to say that "The symptoms are that any file data which was written within the thirty seconds prior to the unmount may not make it to disk. A workaround is to run sync' before unmounting". He also posted a patch to fix the problem. However, soon thereafter, he posted saying that "that 'fix' didn't fix it. Sorry about that". Until a proper fix can be developed, he recommends that people "please avoid ext3/data=journal". Since "data=journal" is not the default ext3 mode, it is unlikely most people running ext3 will be affected by this. However, it is a data corruption bug so you should double-check that you use either "data=ordered" or "data=writeback" as your ext3 mode of operation. "

Hein Roehrig notes: According to http://www.redhat.com/mailing-lists/ext3-users/msg07522.html there is a bug in the Linux kernel 2.4.18 and 2.5.x which makes ext3 data=journal unsafe when both mmap() and write are used on a file. db3 does exhibit this behavior.

IMHO it should be safe to use data=journal on /var/spool/postfix.

References


© by Ralf Hildebrandt
This document contains links to external information sources that I do neither monitor nor control. I explicitly disclaim any liabilities in respect to external references.
You are getting this document without any guarantees. Any methods shown above are meant as demonstration and may be wrong in some place. You may damage your system if you try to follow my hints and instructions. You do this at your own risk!
I am nerdier than 99% of all people. Are you nerdier? Click here to find out!

Locations of visitors to this page
This file was last modified 17. Jan 2007 by hildeb