Massive /tmp files

Aki Tuomi aki.tuomi at open-xchange.com
Fri Jan 22 20:33:45 EET 2021


> On 22/01/2021 20:29 Ron Garret <ron at flownet.com> wrote:
> 
>  
> On Jan 22, 2021, at 10:05 AM, @lbutlr <kremels at kreme.com> wrote:
> 
> > On 22 Jan 2021, at 09:07, Ron Garret (gmail) <ron.garret at gmail.com> wrote:
> >> On Jan 22, 2021, at 8:02 AM, @lbutlr <kremels at kreme.com> wrote:
> >> 
> >>> On 21 Jan 2021, at 18:08, MRob <mrobti at insiberia.net> wrote:
> >>>> Hello,
> >>>> I just found user who has single folder (standard maildir format) that filled with over 8mil files and 800GB in the /tmp subdirectory of that folder:
> >>> 
> >>> Are they real files or hard links?
> >> 
> >> How would you distinguish a hard link from a “real file”?
> > 
> > ls -l will show the number of hard links to a file in the first column after the permissions (or it showed the number off files (including . and ..) inside a directory if it's a directory entry).
> 
> Ah, I misinterpreted the question then.  You meant (I presume) “Are they 8 million distinct files, or 8 million hard links to a (much) smaller number of actual underlying inodes.”
> 
> So then my next question is (and I’m not intending to challenge you here, I’m just trying to get a better understanding of how dovecot works under the hood): where would these hard links come from?  What does dovecot use hard links for?
> 
> rg

There should not be any files under /tmp normally. If there are, you can look at what they are, and decide whether to rm them or move them under /new.

Maildir delivery says that you first write the file under /tmp and then link-unlink the file into /new.

Aki


More information about the dovecot mailing list