LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



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

Rep: Reputation: 15
Inodes?


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?

Thanks
 
Old 05-24-2008, 10:18 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791Reputation: 791
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).
 
  


Reply


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 11:16 PM
what is inodes? Paxmaster Linux - General 4 06-20-2005 06:53 AM
Inodes bambolin Linux - Newbie 3 04-24-2005 03:17 PM
Out of Inodes tmiles Linux - Newbie 4 02-06-2005 09:35 PM
Inodes used up wolferd1 Linux - General 2 02-04-2005 05:22 PM


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

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