[Dovecot] unlink_directory failed with 'Device or resource busy' on NFS

Timo Sirainen tss at iki.fi
Mon Aug 29 06:32:47 EEST 2011

On Wed, 2011-08-24 at 03:00 +0000, 김기태 wrote:
> imap(name at domain.com<mailto:name at domain.com>): Error: unlink_directory(/data/domain.com/name/INBOX/direct/.nfs00000000000033fd000000cd) failed: Device or resource busy
> How can I solve this problem?

That's a bit problematic, because there's not much Dovecot can do about
it.. Another session has the mailbox opened and kernel keeps those files
open after deletion as .nfs* files that can't be deleted.

> mail_location = maildir:~:LAYOUT=fs

LAYOUT=maildir++ solves this by renaming everything under
~/Maildir/DOVECOT-TRASHED/ directory and hiding any errors about not
being able to delete .nfs* files. They are then deleted sometimes later.

But with LAYOUT=fs this isn't really possible, because such directory
would show up as being "DOVECOT-TRASHED" mailbox (not a problem with
Maildir++ because all mailboxes begin with ".").

I guess maybe the renaming could be done under ~/Maildir/tmp/ but that's
a bit ugly since it won't work generally with all mailbox formats..

All in all, currently this seems like too much trouble to fix.

More information about the dovecot mailing list