Search code examples
phpinode

How to fix all inodes being in use?


I have an upload site for uploading images and files. We've been running for two months and since then have 4.5k uploaded files and images. About 4.3k images and 200 files.

Last night we had a "small ddos attack" that slowed page loading up to 15 seconds. A few hours after we reached an inodes quota of 100% but it's imposible that we've exceeded 1.280.000 files (OVH limit of indoes).

Could you help?


Solution

  • I had a similar issue, I found out the files piling up under one specific directory using this command-

    $find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n
    

    and eventually you can get to a path where you have a dir holding numerous file.

    One solution is to just delete all the files under this tmp to free up inodes. But I think you would like to triage further.

    Hope it helps!