Urgent.News

What's breaking now, across thousands of outlets.

Tech

Inode Exhaustion: The Disk Full Error That Makes No Sense

You run df -h and the root partition shows 85% used. Plenty of space left, right? Then you try to create a new file and get: No space left on device . You check again. You reboot. You even resize the partition. Same error. The problem isn't your disk space. It's your inodes. What Are Inodes? An inode is a data structure that stores metadata about a file: permissions, owner, timestamps, and…

The inode exhaustion issue occurs when a disk appears full due to a lack of available inodes, rather than a shortage of disk space. An inode is a data structure that stores metadata about each file, such as permissions, owner, timestamps, and pointers to the data blocks on disk. Every file, directory, and symlink requires an inode to function correctly. The problem arises when a large number of small files accumulate, consuming all available inodes.

The classic scenario involves a production server hosting a Node.js application. The disk showed 85% usage, but the inode count was at 100%. This contradiction confuses engineers, who must investigate further. Tiny files, such as those created by npm installs, webpack cache entries, or log rotation, contribute significantly to inode exhaustion. Misconfigured logrotate settings, ephemeral session files, and PHP sessions can also exacerbate the issue.

To diagnose inode exhaustion, first confirm the problem by running df -i. If any partition shows 100% inode usage, the issue is identified. Next, find the largest directories using the du command and prioritize directories with many files, not necessarily the largest by size. Once the suspect directory is found, check if the files are small (under 1KB) using the find command. Deleting these files frees up inodes and resolves the issue.

Prevention involves proper logrotate configuration, which compresses and rotates old logs instead of accumulating them. A cron job can warn administrators when inodes reach critical levels, reducing panic and downtime. In cases where the inode count is too low for the workload, options include resizing the filesystem, moving data to a larger partition, or recreating the filesystem with higher inode density.

In summary, inode exhaustion is a common issue caused by a lack of available inodes. By understanding the causes and implementing preventative measures, sysadmins can avoid this frustrating "No space left on device" error.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Turning a video clip into a game sprite sheet in the browser

I make 2D characters by generating a short animation video and cutting it into a sprite sheet. For a while that meant ffmpeg, a Python script and a lot of fiddling with transparency.

  • Extract frames by manipulating video element's currentTime property and waiting for seeked event.
  • Identify backdrop color using corners of each frame for background removal.
  • Implement process with plain JavaScript, no external dependencies, returning array of frame data.

How to Learn Kafka (Without Mixing Up Topics, Partitions, and Consumer Groups)

You watch a twenty-minute Kafka explainer over lunch. Topics, partitions, consumer groups, offsets. It all clicks. Two weeks later a teammate asks why your consumer isn't picking up messages, and you…

  • A topic is a named stream of records, not a queue
  • Topics are divided into partitions for scalability
  • Consumer groups are teams of consumers sharing the same group id

More from Sunday 8 November →