Questions tagged [inode]

An inode (index node) is a data structure found in many Unix file systems. Each inode stores all the information about a file system object (file, device node, socket, pipe, etc.), except data content and file name.

Each file is associated with an inode, which is identified by an integer number, often referred to as an i-number or inode number. Inodes store the following information about files and directories (folders):

  • Inode number

  • Mode information to discern file type

  • Number of links to the file

  • UID of the owner

  • Group ID (GID) of the owner

  • Size of the file

  • Actual number of blocks that the file uses

  • Time last modified

  • Time last accessed

  • Time last changed

On many types of file system implementations, the maximum number of inodes is fixed at file system creation, limiting the maximum number of files the file system can hold. A typical allocation heuristic for inodes in a file system is one percent of total size. The inode usage can typically be found by running du -hi.

The inode number indexes a table of inodes in a known location on the device; from the inode number, the file system driver portion of the kernel can access the contents of the inode, including the location of the file allowing access to the file.

A file's inode number can be found using the ls -i command. The ls -i command prints the i-node number in the first column of the report.

Further Reading:

  1. Speaking UNIX: It is all about the inode
  2. Wikipedia entry on inodes.
61 questions
35
votes
7 answers

Find directories with lots of files in

So a client of mine got an email from Linode today saying their server was causing Linode's backup service to blow up. Why? Too many files. I laughed and then ran: # df -ih Filesystem Inodes IUsed IFree IUse% Mounted on /dev/xvda 2.5M …
Oli
  • 299,380
34
votes
2 answers

False disk full error: apt-get unable to install or remove

I encountered the following error while upgrading my Ubuntu 12.04 server. Now apt-get is unable to install or removed any package. Unpacking linux-headers-3.13.0-62 (from .../linux-headers-3.13.0-62_3.13.0-62.102~precise1_all.deb) ... dpkg: error…
sourav c.
  • 46,120
30
votes
4 answers

Running out of inodes

I cannot update Ubuntu because I have 99% inode usage. What is the easiest way for me to alleviate this problem? Thanks for your help.
xaav
  • 423
18
votes
3 answers

How can I create an EXT4 partition with an extra large number of inodes?

About inodes In Ubuntu, each file and directory is a so-called inode. You can use df -i to check the number of inodes in use and available for all mounted filesystems. Question If you create a new EXT4-partition, it uses the default number of…
bzero
  • 512
10
votes
5 answers

/usr/src is eating up all inodes

It seems /usr/src (apparently old kernels) used up all my inodes: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda4 489600 489600 0 100% / devtmpfs 219658 539 219119 1% /dev none …
klingone
  • 101
6
votes
1 answer

How do I remove old kernels despite 100% inode use in /usr?

I was trying to update my packages today: $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have…
Housni
  • 230
6
votes
1 answer

Are there any drawbacks to creating ext4 file systems with maximum inodes?

Are there any drawbacks to creating ext4 file systems with 2^32-1 inodes? I have a 1tb drive and I would like to store 800 million to 1.5 billion small files on it. It seems that the max is 4 billion, so I'm wondering whether I could just set it to…
Fluffy
  • 1,604
5
votes
0 answers

orphaned inodes on root file system (ext4); persistent problem

On my trusty systems (VMs under vmWare, desktops, and laptops), we have the following issue. The root file system seems to have inodes that are never marked as "free". After a month of a working server the df -i show a 100% usage of inodes on / (an…
mathic
  • 51
4
votes
2 answers

How to prevent users from deleting files that are already in use?

Consider this scenario: User is executing a command on a file. This file becomes 'in-use' now. $ tail -f somefile.log In another shell, user deletes the file. $ rm somefile.log Now, this file is 'removed'. Meaning the only hardlink to the file…
4
votes
2 answers

Is possible to increase inode in ubuntu 16.04?

df -i shows Filesystem Inodes IUsed IFree IUse% Mounted on udev 1745003 593 1744410 1% /dev tmpfs 1760785 914 1759871 1% /run /dev/sda1 5283840 5283840 0 100% / tmpfs …
3
votes
2 answers

apt-get -f install No space left on device (Ubuntu 14.04)

I'm tring to run sudo apt-get -f install Output: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer…
johan855
  • 133
3
votes
2 answers

Free space issue Ubuntu 14.04 not loging in after update

I have updated my desktop pc to kernel 4.4.0-38 from 4.4.0-36 (that was ok). After restart I couldn't log in into my computer anymore. With advanced from grub, i selected the old 4.4.0-36 kernel and tried to delete the new one 4.4.0-38. Details of…
user484859
3
votes
2 answers

How to list files and their inode numbers in current directory?

How can I obtain list of items and their inode numbers in the current working directory ?
2
votes
1 answer

Ran out of inodes - 100% Full

I am using Ubuntu 16.04 on AWS EC2 instance which has been working fine until this problem. My problem is that I've used 100% of available inodes, as I discovered with this command: $ df -i Filesystem Inodes IUsed IFree IUse% Mounted on udev …
Muzz
  • 21
2
votes
1 answer

16.04 Can't login after sleep - Clearing orphaned inode

I put my computer in sleep before going home from work. When I got in the next morning moving the mouse and hitting the keyboard wouldn't wake it up. So I held the power button for a hard shutdown. After that, it will turn on, but when I try to…
1
2 3 4 5