Skip to main content

Could swap use many inodes? [Resolved]

I have got a graph about high inode use of our server's disk but I haven't got any detailed information (like df -i) so I'd like to guess the reason.

  • Operating System: Red Hat Linux
  • Process: PDF generation

Question Credit: Richard Baka
Question Reference
Asked July 11, 2018
Tags: swap, inode
Posted Under: Network
2 Answers

Swap space from a swap partition does not use any inodes, as swap partitions don't contain a real file-system.

If you use Swap File(s) rather than a swap partition, your systems only uses as many inodes as you have swap files.

See for instance this Q&A to find which part of your file system has (too) many inodes to investigate the cause. (Runaway mail spool, PHP sessions files that don't get cleaned etc.

credit: HBruijn
Answered July 11, 2018

You don't mention what operating system, but generally swap will be either a dedicated partition, or a swap file, and will not cause excess inode usage.

It's most likely something creating temporary files which are not being cleaned up.

Rather than saying you'd like to guess, or asking us to guess, you'd be better off spending your time logging onto the system and actually finding out which file system has high inode usage, which you already know how to do, then going from there.

credit: USD Matt
Answered July 11, 2018
Your Answer