Re: ReiserFs and qmail
On Wed, Jun 20 2001, Peter van Dijk [EMAIL PROTECTED] wrote: On Tue, Jun 19, 2001 at 08:15:11PM +, Nick (Keith) Fish wrote: [snip] I'm not sure on the statement that qmail is unreliable under Linux due to its assumptiopn that link is a synchronous operation. I've never read anything about it. Anyone else? This is true. I'm not sure, however, if this is ext2fs's or Linux's fault. If the latter, ReiserFS suffers as well. I don't think it occurs if you mount /var/qmail, especially /var/qmail/queue with sync option. Look at the FAQ: http://cr.yp.to/qmail/faq/reliability.html#filesystems Do not use async or softupdates filesystems. If you do, and if your system crashes at the wrong moment, you will lose mail. Under Linux, make sure that all mail-handling filesystems are mounted sync. The same comments apply to sendmail and other mailers. ---jul
Re: ReiserFs and qmail
Nick (Keith) Fish [EMAIL PROTECTED] wrote: I'm not sure on the statement that qmail is unreliable under Linux due to its assumptiopn that link is a synchronous operation. I've never read anything about it. Anyone else? The problem comes from the fact that Linux does not adhere to BSD semantics regarding the sync() system call. BSD semantics state that if you sync a file, it's data and it's metadata are synced to disc. Linux, on the other hand, syncs only the data. To sync the metadata, you have to sync() the directory the file resides in. Most software which isn't specifically written with this in mind won't do this. qmail relies on the BSD semantics to guarantee that a message will never be lost after it has been successfully queued. Running a stock qmail under Linux gives you a finitely small chance of losing mail in the event of a power outage or other problem. One way to fix this is to use the syncdir code which Bruce Guenter distributes. It transparently makes Linux's sync() act like a standard BSD sync. Bruce's qmail+patches SRPM used to include syncdir; I don't know if it does anymore, but he also distributes it separately at untroubled.org. Charles -- --- Charles Cazabon[EMAIL PROTECTED] GPL'ed software available at: http://www.qcc.sk.ca/~charlesc/software/ Any opinions expressed are just that -- my opinions. ---
Re: ReiserFs and qmail
Charles Cazabon [EMAIL PROTECTED] wrote: The problem comes from the fact that Linux does not adhere to BSD semantics regarding the sync() system call. BSD semantics state that if you sync a file, it's data and it's metadata are synced to disc. Linux, on the other hand, syncs only the data. To sync the metadata, you have to sync() the directory the file resides in. This depends upon the filesystem. E2fs behaves that way, but XFS and ReiserFS don't. But the real problem with ReiserFS (and XFS) and qmail is that Dan assumes that link() is synchronous. That might be true for FFS filesystems, especially under BSD, but it's not true for ReiserFS and XFS. The ReiserFS people have a patch available from: http://www.jedi.claranet.fr/qmail-link-sync.patch Which adds sync's after link's. It should be used with XFS filesystems, too. But, looking at the patch, I see that it doesn't fsync() after the mess link is created in qmail-queue.c. Hmm... Looks like he changed something in that area, then undid it: - if (link(pidfn,messfn) == -1) die(64); + if (link(pidfn,messfn) == -1) die(64); I wonder why... -Dave
ReiserFs and qmail
Hello everyone, We're going to install a new production server with the lastest linux kernel (2.4.5) and ReiserFS. Is there any issue regarding qmail? I have done some research and I found a Qmail and ReiserFS integration and optimization HOWTO in http://www.jedi.claranet.fr How accurate is the information on that web? Anything else to take care of? Thanks in advance === Paco Gracia Director Técnico Net2u_ http://www.net2u.es
Re: ReiserFs and qmail
Paco Gracia wrote: I have done some research and I found a Qmail and ReiserFS integration and optimization HOWTO in http://www.jedi.claranet.fr How accurate is the information on that web? Anything else to take care of? Thanks in advance === Paco Gracia Looks good to me. I can't offer any technical advice on the suggest settings for ReiserFS since I haven't had a chance to play with it yet; but he seems to know what he is talking about. :-) I highly recommend against applying the patch he has at the top of the Qmail Tuning section, though. That is very unethical e-mail practice. I am not sure about the recommendation to lower the conf-split, since, again, I am not in any way familiar with ReiserFS's operation. Generally you want a large split since filesystems perform better with many directories with a couple of files than a few directories with lots of files. My advice, test it for yourself; just make sure you are using a prime number for the split. I'm not sure on the statement that qmail is unreliable under Linux due to its assumptiopn that link is a synchronous operation. I've never read anything about it. Anyone else? Like it says, I wouldn't use ReiserSMTP in a production environment. Lastly, common recommendations: if you are going to be running a big server, run your queue and Maildirs (run Maildirs, not Mailboxes) on a 15k RPM SCSI disk with a good controller. Don't be afraid to spend some cash, here. You will have a lot less headaches if/when one of your customers decides to start spamming from your server or your own server comes under siege from UBE. -- Nick (Keith) Fish Network Engineer Triton Technologies, Inc.
Re: ReiserFs and qmail
On Tue, Jun 19, 2001 at 08:15:11PM +, Nick (Keith) Fish wrote: [snip] I'm not sure on the statement that qmail is unreliable under Linux due to its assumptiopn that link is a synchronous operation. I've never read anything about it. Anyone else? This is true. I'm not sure, however, if this is ext2fs's or Linux's fault. If the latter, ReiserFS suffers as well. Greetz, Peter -- Against Free Sex! http://www.dataloss.nl/Megahard_en.html
Re: ReiserFs and qmail
On Tue, 19 Jun 2001, Nick (Keith) Fish wrote: I am not sure about the recommendation to lower the conf-split, since, again, I am not in any way familiar with ReiserFS's operation. Generally you want a large split since filesystems perform better with many directories with a couple of files than a few directories with lots of files. My advice, test it for yourself; just make sure you are using a prime number for the split. ReiserFS negates the need for this, as that is one of the strong suits of the FS... -- John Gonzalez / [EMAIL PROTECTED] / [EMAIL PROTECTED] Tularosa Communications, Inc. (505) 439-0200 voice / (505) 443-1228 fax http://www.tularosa.net / ASN 11711 / JG6416 [--[ sys info ]---] 6:15pm up 285 days, 23:44, 3 users, load average: 0.00, 0.04, 0.07
Re: ReiserFs and qmail
We are running Qmail on Reiser and have been very happy. You can see one thread in this list from me where we got intermittent errors from qmail when doing a lot of mailings at a time. We discovered that the qmail patch for Reiser caused the error. Look for 'qmail-inject error' from me in the list. The only time that this combo is dangerous if when you have a system crash. Because neither ext2 (AFAIK) or Reiser sync the disk when creating a link, there is a possibility that if the system crashed before the kernel synced the disk, a mail can be lost. Evidently on BSD when a link is made it is immediately sync to disk. However, with my understanding of Reiser and it being a journaling FS, this should never cause a problem. I would however suggest making the small change to the patched code so that you do not get senseless errors. Brian Moon -- dealnews.com, Inc. Makers of dealnews, dealmac http://dealnews.com/ | http://dealmac.com/ - Original Message - From: John Gonzalez/netMDC admin [EMAIL PROTECTED] To: Nick (Keith) Fish [EMAIL PROTECTED] Cc: Qmail Mailing List [EMAIL PROTECTED] Sent: Tuesday, June 19, 2001 7:17 PM Subject: Re: ReiserFs and qmail On Tue, 19 Jun 2001, Nick (Keith) Fish wrote: I am not sure about the recommendation to lower the conf-split, since, again, I am not in any way familiar with ReiserFS's operation. Generally you want a large split since filesystems perform better with many directories with a couple of files than a few directories with lots of files. My advice, test it for yourself; just make sure you are using a prime number for the split. ReiserFS negates the need for this, as that is one of the strong suits of the FS... -- John Gonzalez / [EMAIL PROTECTED] / [EMAIL PROTECTED] Tularosa Communications, Inc. (505) 439-0200 voice / (505) 443-1228 fax http://www.tularosa.net / ASN 11711 / JG6416 [--[ sys info ]---] 6:15pm up 285 days, 23:44, 3 users, load average: 0.00, 0.04, 0.07