Massive /tmp files

MRob mrobti at insiberia.net
Fri Jan 22 21:27:02 EET 2021


On 2021-01-22 16:02, @lbutlr 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?

They are files with no other links.

> I've had some issues (in the past) with thousands of links being
> created to each message, resulting in many millions of "files". I even
> wrote a script to remove all the linked files leaving only one actual
> file behind, but I haven't had to do that in quite a while (a year?
> More?).
> 
> I don't seem to have the script handy (it's around somewhere), but
> this is basically what I did:
> 
> <https://unix.stackexchange.com/a/286780/61289>
> 
>> I think the dir ran out of inode space so its not ongoing problem. My 
>> question is only can I purge that folder without breaking something 
>> more? If it tries to re-fill again I will try to debug
> 
> AIUI tmp is temp and can go away, though I'd stop dovecot first just
> to be extra safe.

Date on files is over 2yrs ago with dates all newer than files in "cur" 
folder so looks like user was moving massive number messages then 
dovecot choked? But 8mil seem impossible for almost any user. I can't 
read all of them :) but looked at a few and they are normal messages, 
tho a lot seems spam.

Will have to talk to the user but I'm inclined to purge.

Thank you for helping me!


More information about the dovecot mailing list