LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2010, 04:49 AM   #1
fezzie
LQ Newbie
 
Registered: Feb 2010
Posts: 3

Rep: Reputation: 0
Unhappy Inodes and the superblock


I know that an inode is an area of the disk that contains info about a file. When you remove a file the entry is removed and the inode is marked open for use. What happens when you move a file? Does it retain its inode number or does it get a new unique number? How does this move effect the superblock?
 
Old 02-26-2010, 05:16 AM   #2
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
When you move a file, the inode is not changed, because the file is not changed. What does happen, is that the directory's contents (which is a list of inodes) is updated.
The superblock is more used to retain the status of inodes (ie list of free ones that can be recycled). This is thus also not affected
by the file move.
The inode will be updated when you hard link a file (reference count increments) or delete it (ref count decrement and if it turns 0, file
removal + inode freeing).
 
1 members found this post helpful.
Old 02-26-2010, 05:35 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Quote:
Originally Posted by timmeke View Post
When you move a file, the inode is not changed,
as long as the move is within one file system; a move between file systems is, in effect, a copy and a delete.
 
1 members found this post helpful.
Old 02-26-2010, 06:01 AM   #4
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Yes, you're right, catkin. Thanks for the completion.
 
1 members found this post helpful.
  


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
when inodes, superblock and data block are created? xcore_on Linux - Newbie 1 05-02-2006 04:54 PM
Inodes ??? Texas_student Linux - Software 2 03-22-2006 10:16 PM
inodes wolferd1 Linux - Newbie 1 03-12-2005 10:28 PM
Inodes used up wolferd1 Linux - General 2 02-04-2005 04:22 PM
how to recover from superblock and inodes daemonthread Linux - General 0 06-23-2004 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:47 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration