rmdir() EBUSY warnings on 2.2.12
Hi,
I'm getting a lot of syslog spam on FreeBSD 10 from nfs_flush_file_handle_cache_dir where, apparently it tries to rmdir() the mountpoint of my mail storage.
Jul 4 00:04:44 mailhost dovecot: imap(user@example.com): Error: nfs_flush_file_handle_cache_dir: rmdir(/var/mail/vhosts/example.com) failed: Device busy
We're using ZFS and have /var, /var/mail, /var/mail/vhosts, /var/mail/vhosts/example.com and /var/mail/vhosts/example.com/user as separate ZFS datasets (to enable per-user and per-domain snapshotting).
So apart from NFS flushing being unnecessary (ZFS != NFS) I'm not really sure why using rmdir() for another directory than the Maildir specified in mail_location is a good idea. I.e. given that Maildirs shouldn't ever be emtpy (cur,new,tmp) anyway.
-- Met vriendelijke groet, With kind regards, Giel van Schijndel
A programmer started to cuss Because getting to sleep was a fuss As he lay there in bed Looping 'round in his head was: while(!asleep()) sheep++; -- piercings -- http://bash.org/?845468
On 4.7.2014, at 1.30, Giel van Schijndel giel+dovecot@mortis.eu wrote:
I'm getting a lot of syslog spam on FreeBSD 10 from nfs_flush_file_handle_cache_dir where, apparently it tries to rmdir() the mountpoint of my mail storage.
Jul 4 00:04:44 mailhost dovecot: imap(user@example.com): Error: nfs_flush_file_handle_cache_dir: rmdir(/var/mail/vhosts/example.com) failed: Device busy
We're using ZFS and have /var, /var/mail, /var/mail/vhosts, /var/mail/vhosts/example.com and /var/mail/vhosts/example.com/user as separate ZFS datasets (to enable per-user and per-domain snapshotting).
So apart from NFS flushing being unnecessary (ZFS != NFS) I'm not really sure why using rmdir() for another directory than the Maildir specified in mail_location is a good idea. I.e. given that Maildirs shouldn't ever be emtpy (cur,new,tmp) anyway.
Don't set mail_nfs_index=yes or mail_nfs_storage=yes and Dovecot won't try these kludgy things to flush NFS caches. They don't fully work anyway and they are highly discouraged for any kind of use, ever. Mainly they exist for backwards compatibility.
On Fri, Jul 04, 2014 at 01:59:02 +0300, Timo Sirainen wrote:
On 4.7.2014, at 1.30, Giel van Schijndel giel+dovecot@mortis.eu wrote:
I'm getting a lot of syslog spam on FreeBSD 10 from nfs_flush_file_handle_cache_dir where, apparently it tries to rmdir() the mountpoint of my mail storage.
Jul 4 00:04:44 mailhost dovecot: imap(user@example.com): Error: nfs_flush_file_handle_cache_dir: rmdir(/var/mail/vhosts/example.com) failed: Device busy
We're using ZFS and have /var, /var/mail, /var/mail/vhosts, /var/mail/vhosts/example.com and /var/mail/vhosts/example.com/user as separate ZFS datasets (to enable per-user and per-domain snapshotting).
So apart from NFS flushing being unnecessary (ZFS != NFS) I'm not really sure why using rmdir() for another directory than the Maildir specified in mail_location is a good idea. I.e. given that Maildirs shouldn't ever be emtpy (cur,new,tmp) anyway.
Don't set mail_nfs_index=yes or mail_nfs_storage=yes and Dovecot won't try these kludgy things to flush NFS caches. They don't fully work anyway and they are highly discouraged for any kind of use, ever. Mainly they exist for backwards compatibility.
- Aren't those the defaults? Because I didn't set these options.
- I've just explicitly set both to 'no' and I'm still seeing these errors.
-- Met vriendelijke groet, With kind regards, Giel van Schijndel
"For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman
On 4.7.2014, at 9.27, Giel van Schijndel giel+dovecot@mortis.eu wrote:
Don't set mail_nfs_index=yes or mail_nfs_storage=yes and Dovecot won't try these kludgy things to flush NFS caches. They don't fully work anyway and they are highly discouraged for any kind of use, ever. Mainly they exist for backwards compatibility.
- Aren't those the defaults? Because I didn't set these options.
- I've just explicitly set both to 'no' and I'm still seeing these errors.
Are you using dict-file? Looks like the NFS flushing was done there unconditionally, removed now: http://hg.dovecot.org/dovecot-2.2/rev/b2f3b9f5d7cc
On Fri, Jul 04, 2014 at 11:49:37 +0300, Timo Sirainen wrote:
On 4.7.2014, at 9.27, Giel van Schijndel giel+dovecot@mortis.eu wrote:
Don't set mail_nfs_index=yes or mail_nfs_storage=yes and Dovecot won't try these kludgy things to flush NFS caches. They don't fully work anyway and they are highly discouraged for any kind of use, ever. Mainly they exist for backwards compatibility.
- Aren't those the defaults? Because I didn't set these options.
- I've just explicitly set both to 'no' and I'm still seeing these errors.
Are you using dict-file? Looks like the NFS flushing was done there unconditionally, removed now: http://hg.dovecot.org/dovecot-2.2/rev/b2f3b9f5d7cc
I'm using acl_shared_dict
acl_shared_dict = file:/var/mail/vhosts/%d/shared-mailboxes.db
That uses a file-stored dictionary but I'm not sure that means it uses dict-file. Would that trigger the NFS flushing attempts?
-- Met vriendelijke groet, With kind regards, Giel van Schijndel
"A clever person solves a problem. A wise person avoids it." -- Albert Einstein
On 5.7.2014, at 11.32, Giel van Schijndel giel+dovecot@mortis.eu wrote:
On Fri, Jul 04, 2014 at 11:49:37 +0300, Timo Sirainen wrote:
Are you using dict-file? Looks like the NFS flushing was done there unconditionally, removed now: http://hg.dovecot.org/dovecot-2.2/rev/b2f3b9f5d7cc
I'm using acl_shared_dict
acl_shared_dict = file:/var/mail/vhosts/%d/shared-mailboxes.db
That uses a file-stored dictionary but I'm not sure that means it uses dict-file. Would that trigger the NFS flushing attempts?
Yep, that's the one ("file:" = dict file backend).
On Sun, Jul 06, 2014 at 07:11:15PM +0300, Timo Sirainen wrote:
On 5.7.2014, at 11.32, Giel van Schijndel giel+dovecot@mortis.eu wrote:
On Fri, Jul 04, 2014 at 11:49:37 +0300, Timo Sirainen wrote:
Are you using dict-file? Looks like the NFS flushing was done there unconditionally, removed now: http://hg.dovecot.org/dovecot-2.2/rev/b2f3b9f5d7cc
I'm using acl_shared_dict
acl_shared_dict = file:/var/mail/vhosts/%d/shared-mailboxes.db
That uses a file-stored dictionary but I'm not sure that means it uses dict-file. Would that trigger the NFS flushing attempts?
Yep, that's the one ("file:" = dict file backend).
I'm now using b2f3b9f5d7cc on top of 2.2.13 (as a patch in the FreeBSD port) and I no longer see this nfs flushing errors being spammed to the logs.
-- Met vriendelijke groet, With kind regards, Giel van Schijndel
"A clever person solves a problem. A wise person avoids it." -- Albert Einstein
participants (2)
-
Giel van Schijndel
-
Timo Sirainen