Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

An inode is the filesystem record that stores a file’s metadata—such as its type, permissions, owner, timestamps, size information and link count—and its inode number. The filename is kept separately in a directory entry, while the file’s contents occupy data blocks.

Linux can therefore report “No space left on device” even when df -h shows free gigabytes: the filesystem may have exhausted its inode supply after creating a very large number of files. Use df -i to measure inode capacity, stat to inspect one file, and a filesystem-bounded find scan to locate directories containing the most entries.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What an inode contains

Linux’s inode(7) documentation describes the basic rule: each file has an inode containing metadata about that file. The inode is identified by an inode number, and system calls such as stat(2) and statx(2) can retrieve its information.

An inode normally records:

  • the file type, such as regular file, directory, symbolic link, socket or device
  • permission bits and, where supported, extended attributes
  • numeric user and group ownership
  • access, modification and metadata-change timestamps
  • the number of hard links to the inode
  • the file size and the map of data blocks containing its contents
  • the inode number used to identify the record within that filesystem

The inode number is not a machine-wide identifier. It is guaranteed to be unique only within its own filesystem, so two mounted filesystems can legitimately contain files with the same inode number.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

Inode, directory entry and data blocks

These three pieces are easy to confuse:

Piece What it does
Inode Stores metadata and references that describe the file.
Directory entry Maps a human-readable filename to an inode number. A directory is itself a file whose contents can be traversed to find those mappings.
Data blocks Store the file’s actual contents. The inode records how to locate those blocks.

Ext4 documentation describes inode metadata as including timestamps, block maps and extended attributes. Because names, metadata and contents are separate, creating many tiny files can consume thousands or millions of inodes while using comparatively few data blocks.

Why free disk space can coexist with “No space left on device”

A filesystem tracks at least two different resources: data blocks for file contents and inodes for file records. A write to a large existing file mainly needs free blocks. Creating a new file needs an available inode as well as directory space and, eventually, data blocks.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Observation Likely resource under pressure What to check
df -h is near 100% and df -i is not Data blocks Find large files, deleted-but-open files and filesystem-specific reserved space.
df -i is near 100% while df -h still has room Inodes Look for a very large number of files, often small files, on the affected mount.
Both reports are near 100% Blocks and inodes may both be constrained Deal with the mount deliberately; removing a few large files may not solve inode exhaustion.

Filesystem design matters. Some filesystems allocate inode records dynamically; others create a fixed inode pool when the filesystem is made. Read the filesystem type shown by df -T before assuming that resizing or reformatting has the same effect everywhere.

Check inode usage for a filesystem with df

GNU Coreutils’ df switches from block statistics to inode statistics when you use -i.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
# Show inode totals for all visible filesystems
df -i

# Show the filesystem that contains /var
df -i /var

# Include the filesystem type
df -iT /var

# Restrict the report to local filesystems
df -il

A typical report includes these columns:

Column Meaning
Inodes or itotal Total inode capacity reported for the filesystem.
IUsed or iused Inodes currently allocated.
IFree or ifree Inodes still available.
IUse% or ipcent Percentage of inode capacity in use.
Mounted on The mount point whose filesystem is being reported.

How a path argument changes the result

df -i /var does not count only files directly inside /var. It reports the filesystem containing that path. If /var is a separate mount, you receive that mount’s inode totals; if it is part of the root filesystem, you receive the root filesystem’s totals. Use the mount point printed by df as the boundary for later investigation.

Read inode percentage separately from byte percentage

After checking inode capacity, check data-block capacity for the same path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
df -h /var
df -P /var

The human-readable form, df -h, is convenient for people; df -P uses a portable, predictable layout that is useful in scripts. Compare the two reports rather than treating one percentage as a substitute for the other. A mount can be 99% full by bytes and 20% full by inodes, or the reverse.

Use the filesystem type as part of the diagnosis

Run df -iT /mountpoint when you need the inode report and filesystem type together. Output varies with the filesystem, operating-system distribution and mount visibility. A container, chroot or restricted service account may see a different set of mounts from the host, and permission errors can prevent complete inspection.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Inspect one file’s inode with stat

Use stat when the question concerns one path rather than a whole filesystem:

stat /path/to/file

# Inode number, hard-link count, size, and name
stat -c '%i %h %s %n' /path/to/file

The default output includes the inode number, file type, permissions, owner and group, timestamps, size, block information and link count. In the concise format, %i expands to the inode number, %h to the hard-link count, %s to the size in bytes and %n to the name.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Hard links and inode consumption

Multiple hard-link names can refer to one inode. Creating another hard-link name therefore adds a directory entry but does not allocate another inode for the same file. The inode remains allocated until its link count reaches zero and no process still has the file open. This is why counting names and counting inodes are related but not identical operations.

Locate directories with unusually many entries

df -i identifies the affected filesystem, but it does not identify the directory or service responsible. Once you know the correct mount point, count directory entries without crossing into another filesystem:

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
find /var -xdev -printf '%hn' 2>/dev/null 
  | sort | uniq -c | sort -nr | head

Replace /var with the mount path reported by df -i. The -xdev option keeps the traversal on that filesystem; without it, a scan can enter another mounted filesystem and make the counts misleading. Redirecting standard error hides inaccessible paths, so treat the result as a practical lead rather than proof that every directory was examined.

Investigate the directories at the top of the list

For each high-count directory:

  1. Inspect its immediate contents and ownership with commands such as ls -la and stat.
  2. Determine which service or package created the files. Common sources include failed log rotation, package-manager caches, mail queues, temporary-file directories, container image layers and applications that emit one small file per request, job or session.
  3. Check the service’s documented retention, queue and cleanup settings before deleting anything.
  4. After an approved cleanup, run df -i /mountpoint again to verify that free inodes increased.

Do not assume that the directory with the most names is safe to empty. Removing active queue files, lock files, database files or a service’s working data can cause corruption or interrupt production traffic.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A practical troubleshooting sequence

When an application reports “No space left on device” but ordinary disk usage looks normal, work from the filesystem outward:

  1. Identify the failing path. Use the exact path from the application error, then run df -i /that/path and df -h /that/path. This ensures you are checking the filesystem that actually receives the new file.
  2. Check both percentages. If IUse% is close to 100%, treat the incident as inode pressure. If byte usage is close to 100%, investigate blocks as well.
  3. Confirm the filesystem type and mount. Run df -iT /that/path. A separate mount, bind mount or container filesystem may explain why a broad scan of the host does not match the application’s view.
  4. Bound the search. Run the find ... -xdev count against the reported mount. Focus on directories with unusually high entry counts rather than deleting files at random.
  5. Establish ownership and purpose. Use metadata and service configuration to determine whether the files are logs, cache objects, queued messages, temporary data or required application state.
  6. Apply the supported cleanup. Prefer the service’s rotation, purge or retention command. If manual removal is documented, stop or quiesce the service when required and preserve anything needed for recovery.
  7. Verify and monitor. Re-run both df -i and df -h, then watch whether inode use rises again. A rapid rebound indicates that the generating workload or retention policy still needs correction.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common pitfalls

Scanning the wrong filesystem

A recursive scan of / can cross mounts and mix unrelated filesystems. Always begin with the path-specific df -i result and use -xdev for the follow-up search.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Confusing filenames with inodes

A filename is a directory-entry name, not the inode itself. Renaming a file normally changes the directory mapping while preserving the inode and its contents. Hard links add names that share an existing inode; symbolic links are separate filesystem objects with their own inode.

Assuming a low byte count means low inode use

Millions of zero-byte or tiny files can consume nearly all available inodes while occupying little data space. The inode report is the decisive measurement for that case.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deleting files without checking open handles

Deleting a name does not necessarily release blocks immediately if a running process still has the file open. That situation is primarily a byte-capacity issue, but it is another reason to identify the resource shown as exhausted instead of relying on a single cleanup command.

Expecting identical inode numbers across mounts

An inode number has meaning only in its filesystem. Use the device or mount information alongside the number when correlating records from different filesystems.

Prevent inode exhaustion

  • Set retention limits for logs, caches, queues and temporary artifacts, and verify that rotation actually removes or archives old files.
  • Prefer storage layouts that avoid creating an unbounded number of tiny files when the application can safely batch or compact records.
  • Monitor inode percentage separately from byte percentage for every important mount.
  • Alert before 100% inode use so a service has time to rotate or purge data safely.
  • Review container and build-cache cleanup policies; layered images and short-lived job artifacts can create large file counts.
  • When designing a new filesystem, select a filesystem and creation-time inode strategy appropriate for the expected file count. A fixed inode pool cannot be enlarged in the same way as free data blocks.

Commands at a glance

Goal Command Scope
Show inode use for visible filesystems df -i Aggregate filesystem report.
Check the filesystem containing a path df -i /path One path’s filesystem.
Include filesystem type df -iT /path Inode report plus type.
Limit to local filesystems df -il Local mounts only.
Compare byte usage df -h /path Human-readable block capacity.
Inspect one inode stat /path/to/file Per-file metadata.
Print selected inode fields stat -c '%i %h %s %n' /path/to/file Script-friendly per-file output.
Find directory-entry hotspots find /mountpoint -xdev -printf '%hn' 2>/dev/null | sort | uniq -c | sort -nr | head Bounded investigative scan.

Key points to retain

  • An inode stores a file’s metadata and has a number meaningful only within its own filesystem.
  • Directory entries map names to inodes; data blocks hold contents.
  • df -i measures inode capacity, while df -h measures byte capacity.
  • stat reveals the inode and metadata for one path.
  • High inode use usually means an excessive number of files, often small ones; diagnose the affected mount and clean up through the responsible service.