[Dovecot] I stream read - stale NFS file handle (reboot of server)

Joe joe at fasti.net
Wed Mar 17 00:11:59 EET 2010

> I don't concur.
> NFS is stateless and designed to survive server reboots (why would you have stad otherwise?). What you do is inode randomization on the file system backing the NFS export.
> You get those stale handles when someone on the client has a file on the mount open and some other way the file gets deleted (by another client or right on the server). Since NFS is stateless, the server knows nothing about the file being open. If the file was open on a local file system, the kernel wouldn't actually free the inode because there's still a reference (albeit with no directory entry) on it. But NFS lacks this reference. So clients can work around this by converting unlinks to renames to .nfsXXXX names and sending an unlink to the server only on the last local unlink. Of course, this works only with one client.
> Just to make sure I rememberer all this correctly, I just confirmed with The BooK: See the fourth paragraph of "The NFS Protocol" in Section 9.2 of McKusick/Bostic/Karels/Quarterman (in my edition it's on page 317)

Well, The jist of my setup is this. I have two dovecot installs on two 
different machines. They are running within a jail. The vmail directory 
is actually nfs mounted via AMD on the host machine and is exported to 
the jail'd dovecot's via a nullfs mount. The two dovecot servers both 
handle the incoming mail service but only one of the machines actually 
services imap clients. I dont believe that the handful of users i have 
would have more than one computer logged into dovecot at a time and if 
they did it would only be on the mail01 server and never the mail02.

I've tried restarting the jails and the problem has continued. I have 
not tried to unmount the nullfs mount nor the nfs mount via AMD. I have 
another few jails running web servers. These web servers also use the 
nullfs mount which is actually a NFS mount via the host machine to get 
the content that it serves to the reverse proxy. The web servers also 
use the nullfs NFS mount to write their log files to. Between the two 
machines, there is about 180mbps worth of traffic coming off the NFS 
server. None of the web servers have issues gettnig the content nor 
writing the log files.

I'm not sure if this helps at but it is how i have things set up.

More information about the dovecot mailing list