> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/os/linux/inodes.md).

# inodes

### In linux files are simple structures that do not contain any metadata:

A file is composed of:

* a file name
* an inode number

Directories are Filename-inode number Pairs **Note:** you can think of Diretories as a table of inode parings

```bash
# to view inode-pairs
ls -i
```

### What does an inode contain?

* The size of the file
* The actual physical location on the hard disk where it is located
* Permissions
* Owner, Group owner
* Access time / Modification time, depending on which is active
* Also contains the reference count (basically how many hardlinks point to this particular inode)

### What happens when you use the `ls -l` command?

ls -l --> needs more info --> stat --> looks up the inode --> retuns to shell processor --> output

This runs in a loop for each file in the directory

### Common inode-related Linux Problems:

* No space but after running `df -h` shows space

**This can be caused by inode exhaustion**

Use: `df -hi` to check, if this is at 100% there are no inodes left

#### Causes:

* This can happen on a system where you have a lot of small files that use up all the inodes\*\*
* Can also be caused by systems with a lot of caches

### How inodes are created in Linux:

Classic Filesystems create all the space that they ever going to have when the filesystem is created

Such as: `EXT`

**Note:** Unless you pass an extra flag during installation to overwrite that

Using a modern filesystem like `ZFS`, inodes are created on demand


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.arkannis.net/os/linux/inodes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
