LinuxQuestions.org
Visit Jeremy's Blog.
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 01-01-2009, 09:31 AM   #1
rahmad
Member
 
Registered: Aug 2007
Location: Jordan
Distribution: RHEL, Centos, Debian
Posts: 65

Rep: Reputation: 15
Check Inode Table


hi

I am wondering if i can see my ext3 partition's inode table. is that possible in linux? if yes, how?!
 
Old 01-01-2009, 11:23 AM   #2
a_minor
LQ Newbie
 
Registered: Dec 2008
Location: Tehran , IRN
Distribution: Fedora core 16
Posts: 23

Rep: Reputation: 0
if for example the name of you partition device is /dev/sdax (if you have SCSI hard disk) then you can see all of your partitions in(you must be root user) :
Code:
# fdisk /dev/sda
Command (m for help): p
and if you have entry of your partiotn in /etc/fstab, you can see it in filesystem table as this:
Code:
cat /etc/fstab
and if you have mounted it (even if it hasn't any entry in fstab) you can see its enry in mount table as this :
Code:
cat /etc/mtab
for seeing mtab and fstab , it isn't need for being
root user,

and for special ext3 file system, I prefer:
df -T| grep ext3


I hope this will help you

Last edited by a_minor; 01-01-2009 at 11:27 AM.
 
Old 01-01-2009, 01:08 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
You can use the -li option to list the inode of a file. You can also use find to list the inode of file. The find command has a -printf subcommand that is flexible in what is printed.

The structures of a filesystem are in the kernel land domain, and are something that the kernel driver manipulates, unless it is done indirectly through system calls or via the fuse module. The fuse modules allow you to create filesystem that run in user land, using the full C environment.

On the other hand, if you have read/write access to the partition's device, you can do an end run around the kernel and manipulate the filesystem directly. This is what programs like fsck.ext3 and tune2fs do. You will need to run these programs as root. You could write your own program to examine ext3 file structures and display them how you wish. The source code for programs like fsck.ext3, or the ext3 driver in the kernel might help.

I don't know of any program which does exactly what you want. There is dumpe2fs which can display some information on ext3 filesystems, including the locations of the inode tables on the filesystem.
Code:
...
Group 2: (Blocks 65536-98303)
  Block bitmap at 65536 (+0), Inode bitmap at 65537 (+1)
  Inode table at 65538-66049 (+2)
  559 free blocks, 2318 free inodes, 208 directories
  Free blocks: 86655-86866, 86869-86898, 86900-86978, 86980-87206, 91852-91862
  Free inodes: 22236-22258, 22260, 22283-24576
...
Knowing the locations of the tables, you could use a disk bit editor or a program like hexdump or od to list areas on the disk.

You can also use dd to cut out a part of the filesystem and examine the file you saved instead of the actual tables on the disk.

Last edited by jschiwal; 01-01-2009 at 01:12 PM.
 
  


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
missing inode table mottl3y Linux - Hardware 8 06-14-2008 10:01 AM
inode table location(UFS2) anwerreyaz *BSD 3 11-20-2006 07:50 AM
How to alter table with no check option minil Programming 0 08-05-2005 09:11 AM
viewing the Inode table 0perat0r Linux - Newbie 1 07-20-2004 03:20 PM
HELP!!! to recover lost inode table moden Linux - General 3 11-26-2002 06:53 AM


All times are GMT -5. The time now is 12:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration