Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-24-2008, 09:04 PM   #1
Registered: Oct 2003
Location: T.O
Distribution: SunOS 10
Posts: 97

Rep: Reputation: 15

Hi all,

I'm trying to understand inodes: I read this description:

an inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object

If an Inode is deleted, will the referencing file/folder be corrupted? Are inodes used for data recovery to the referenced file/folder if corrupted?

Old 05-24-2008, 09:18 PM   #2
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,608
Blog Entries: 15

Rep: Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540Reputation: 1540
For all intents and purposes the inode IS the file and it is the name that is the reference.

In fact if one deletes an open file the inode does not get deleted because it is what is actually open. Only the name goes away. People often mistakenly delete log files to free space not realizing they are held open by a process and then are mystified to see the filesystem size didn't decrease. Once the process that had it open goes away (by reboot if nothing else) then the file is truly closed and the inode gets deleted.

Inodes are important when looking at the difference between "hard" links and symbolic links. Hard links all reference the same inode by different path "names". This is why you can't have two hard links of the same file can't be on different filesystems. Symbolic links on the other hand are actually small pointer files that have their own inodes and simply are pointers to the other inodes to which the symlink refers. You can have 100 hard links of a single file and not increase disk space usage. 100 symlinks on the other hand will increase disk usage (albeit by very little owing to their small size).

It is actually possible (and used to be a frequent occurrence) to run out of inodes BEFORE you run out of space. There is a kernel parameter called ninode that determines the number of inodes one can have.

You might also want to read up on vnodes for similar information for other filesystems (such as journaling ones).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Inodes ??? Texas_student Linux - Software 2 03-22-2006 10:16 PM
what is inodes? Paxmaster Linux - General 4 06-20-2005 05:53 AM
Inodes bambolin Linux - Newbie 3 04-24-2005 02:17 PM
Out of Inodes tmiles Linux - Newbie 4 02-06-2005 08:35 PM
Inodes used up wolferd1 Linux - General 2 02-04-2005 04:22 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration