Questions tagged [inode]

The inode is a data structure in a Unix-style file system which describes a filesystem object such as a file or a directory

The inode is a data structure in a Unix-style file system which describes a filesystem object such as a file or a directory. Each inode stores the attributes and disk block location(s) of the object's data. Filesystem object attributes may include metadata (times of last change, access, modification), as well as owner and permission data.

Directories are lists of names assigned to inodes. A directory contains an entry for itself, its parent, and each of its children.

110 questions
43
votes
9 answers

Relinking a deleted file

Sometimes people delete files they shouldn't, a long-running process still has the file open, and recovering the data by catting /proc//fd/N just isn't awesome enough. Awesome enough would be if you could "undo" the delete by running some…
mbac32768
  • 876
24
votes
6 answers

How to clean up an unprocessed orphan inode list?

I tried to mount a formerly readonly mounted filesystem read-writeable: mount -o remount,rw /mountpoint Unfortunately it did not work: mount: /mountpoint not mounted already, or bad option dmesg reports: [2570543.520449] EXT4-fs (dm-0): Couldn't…
bmk
  • 2,399
19
votes
3 answers

ext4 file-system max inode limit - can anyone please explain?

Recently we had a problem where one of the ext4 file-systems seemed unable to handle very large number of files, more than 6mln in this case, in spite of having enough space. Is it 6mln the max number, an ext4 file-system can have when formatted…
MacUsers
  • 479
17
votes
12 answers

Determine Location of Inode Usage

I recently installed Munin on a development web server to keep track of system usage. I've noticted that the system's inode usage is climbing by about 7-8% per day even though the disk usage has barely increased at all. I'm guessing something is…
Dave Forgac
  • 3,636
16
votes
6 answers

Linux - Help, I'm running out of inodes!

I have a filesystem that has lots of small files. Currently about 80% of inodes are used (I checked with df -i), however only 60% of disk space is used. How can I 'increase' the number of inodes? If it was just disk space, I know that I could just…
Amandasaurus
  • 33,461
15
votes
4 answers

Linux: Why change inode size?

Tune2fs allows to change inode size from default (128 bytes on ext3, 256 bytes on ext4) to almost anything, but it should be power of two. What are the reasons for changing default inode size? Here it's written that this can be done to be able to…
14
votes
3 answers

Link to a specific inode

I have a file that was deleted, but is still held open by a program. I found the inode number using lsof. How can I create a hard link back to that inode?
Jeff Ferland
  • 20,987
12
votes
4 answers

How to find the file at a certain btrfs inode

I have a corrupt file according to btrfs BTRFS info (device sdb1): csum failed ino 367 off 310013952 csum 1601485211 expected csum 3692975992 I assumed ino 367 means inode 367, so I can use find and try to restore the file. However find /path -inum…
12
votes
3 answers

disk space overhead in ext4

I'd like to know if there's some rule (or formula) I can apply to find out how much of disk space will be used by the filesystem in an ext4 partition. for example, in a partition of 100 GB, how much can I actually use? does it depend on other…
cd1
  • 1,514
10
votes
5 answers

100 % inodes in root directory, how to free inodes?

df -i Filesystem-----Inodes-----Iused-----IFree-----IUse-----Mounted on dev/sda2-------732960-----727804-----5156-----100%---- / Only these 2 are having higest inodes, rest all are too low. what can be done to free up inodes? Proc 10937 inodes Sys…
anon
  • 101
10
votes
3 answers

tuning linux cache settings for inode caching

I am dealing with hundred million files in a filesystem (distributed among a lot of subdirectories), and I need to be able to list them very quickly, particularly in order to rsync them efficiently. On a other hand, I don't really need to have the…
john.doe
  • 125
  • 1
  • 1
  • 4
9
votes
2 answers

Can I increase inode count in Linux?

I have a Linux MIPS router with 2.4.17 kernel. Root fs is a tmpfs and /rom is a cramfs. There is 4MB free memory and 3MB free on tmpfs. I can create a few new empty files, but the next ones fail with "not enough space". However, I can append 1MB of…
vlad
  • 846
9
votes
2 answers

ext4: Running out of inodes

I am running out of inodes. Only 11% available: the-foo:~ # df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/system-home 9830400 8702297 1128103 89% /home Is there a way to solve this without creating and…
guettli
  • 3,811
9
votes
4 answers

What does it mean if inode usage is high?

After some google research I have figured out inode usage probably relates to the number of directorys/files. I am guessing there is a limit (thus what determines the inode usage %). What is this limit determined by? If Inode usage hits 100%…
Joshua Enfield
  • 3,564
  • 9
  • 44
  • 64
9
votes
2 answers

In the XFS file system, does the ls command (syscall getdents) access the disk, or is there a cached directory structure in memory?

Just for test, I created and mounted the same XFS file system on two hosts based on a shared device (pmem).Host A created a file in its mounted directory and executed the sync command to ensure that xfs_db can see the newly created inode…
1
2 3 4 5 6 7 8