inode table location ??


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users inode table location ??
# 1  
Old 09-12-2007
Error inode table location ??

Where does the inode table reside ?? And how can i check the inode entries ?

I want to check the entries of inode table corrosponding to the inode no. that i got from the fuser command.

fuser -uV /clocal/mqbrkrs/user/mqsiadm/sanjay
/clocal/mqbrkrs/user/mqsiadm/sanjay:
inode 569506c(t9154r0)
inode 577710c(mqsiadm)
inode 1044732c(mqsiadm)
inode 1155126c(mqsiadm)


Please help !!

ASAP !!
Smilie
# 2  
Old 09-12-2007
The location of the inode table in a file system depends on the particular file system being used. In general, most modern file systems scatter the inodes among the data blocks. This allows an inode to reside close to the data it describes and tends to reduce overall seek time. You don't say what type of check you want to perform. Most file systems include a version of fsck and this program should be able to verify the integrity of the inode table. You need to unmount the file system first and this usually requires single user mode.

If you want to find inode-to-filename mappings, "ls -li" is a tool that comes to mind. You can find all hard links to an inode with a command like:
find /mountpoint -inum 123456 -print
But be aware that it is legal for a file described by an inode to have zero hard links. (Such a file will disappear when the last program that has it open closes it.)
# 3  
Old 09-13-2007
Quote:
Originally Posted by Perderabo
The location of the inode table in a file system depends on the particular file system being used. In general, most modern file systems scatter the inodes among the data blocks. This allows an inode to reside close to the data it describes and tends to reduce overall seek time. You don't say what type of check you want to perform. Most file systems include a version of fsck and this program should be able to verify the integrity of the inode table. You need to unmount the file system first and this usually requires single user mode.

If you want to find inode-to-filename mappings, "ls -li" is a tool that comes to mind. You can find all hard links to an inode with a command like:
find /mountpoint -inum 123456 -print
But be aware that it is legal for a file described by an inode to have zero hard links. (Such a file will disappear when the last program that has it open closes it.)


Hey,

Whats the mountpoint there ?? Is it the name of the directory ??

I got the another point that in ls -li, 'i' shows the inode no. of the file. But then could you please tell me what the fuser -uV Filename1 gives. (As i have shown above). As i compared the inode no. got from ls -li and fuser command, and the nos. where different.
One more thing fuser command is working on directory but not on the file, dont know why ??
fuser -uV /clocal/mqbrkrs/user/mqsiadm/sanjay
/clocal/mqbrkrs/user/mqsiadm/sanjay:
inode 569506c(t9154r0)
inode 577710c(mqsiadm)
inode 1044732c(mqsiadm)
inode 1155126c(mqsiadm)

In the above command "sanjay" is directory, in which there are no. of files which has been recently accessed by someone, whoes ids are listed in the braces () with inode no.
Now here is the catch :
1. This inode no. does't match with the inode no. of the files when i list using ls -li
2. How would I come to know the inode no. that i got from fuser command belongs to which file in that directory (as file name is not mentioned in the o/p of that command )

Please give me some solution to this problem as I am after this since last week.

Thanks !!Smilie
# 4  
Old 09-13-2007
The mountpoint is where the filesystem gets mounted. Run a command like "df -k" which should give you a list of filesystems. Each line will have a directory which is the mountpoint. If the inode numbers do not match, you have the wrong files. Use that find command to locate the file which matches a particular inode number.

You don't say what os you are using. My fuser does not have -V and it does not display inode numbers. To get more info on your fuser, use the command "man fuser" and read the man page. My fuser man page says stuff like "c file is its current directory". The output you show has c on the lines, it looks like you may be dealing with current directories. But I would expect pid's rather that inode numbers. Your fuser is not like mine and you have provided so few details that I really cannot help you here.

The current directory is controlled by the cd command in the shell. If I type "cd /local/local/bin", then /usr/local/bin becomes my current directory and fuser would show the inode of /usr/local/bin in the output.
# 5  
Old 09-14-2007
Error

Quote:
Originally Posted by Perderabo
The mountpoint is where the filesystem gets mounted. Run a command like "df -k" which should give you a list of filesystems. Each line will have a directory which is the mountpoint. If the inode numbers do not match, you have the wrong files. Use that find command to locate the file which matches a particular inode number.

You don't say what os you are using. My fuser does not have -V and it does not display inode numbers. To get more info on your fuser, use the command "man fuser" and read the man page. My fuser man page says stuff like "c file is its current directory". The output you show has c on the lines, it looks like you may be dealing with current directories. But I would expect pid's rather that inode numbers. Your fuser is not like mine and you have provided so few details that I really cannot help you here.

The current directory is controlled by the cd command in the shell. If I type "cd /local/local/bin", then /usr/local/bin becomes my current directory and fuser would show the inode of /usr/local/bin in the output.


Hey,

I am using AIX5.2.
And in "man fuser", it has -V and -c options.
fuser [ -c | -d | -f ] [ -k ] [ -u ] [ -x ] [ -V ]File ...
The fuser command lists the process numbers of local processes that use the local or remote files specified by the File parameter. For block special
devices, the command lists the processes that use any file on that device.

Each process number is followed by a letter indicating how the process uses the file:
c Uses the file as the current directory.
e Uses the file as a program's executable object.
r Uses the file as the root directory.
s Uses the file as a shared library (or other loadable object).

Flags
-V Provides verbose output.
-c Reports on any open files in the file system containing File.
-u Provides the login name for local processes in parentheses after the process number.
-f Reports on open instances of File only.
-x Used in conjunction with -c or -f, reports on executable and loadable objects in addition to the standard fuser output.

As I have said, i am using command (given below)
fuser -uV /clocal/mqbrkrs/user/mqsiadm/sanjay

And it shows the o/p (given below)
/clocal/mqbrkrs/user/mqsiadm/sanjay:
inode 569506c(t9154r0)
inode 577710c(mqsiadm)
inode 1044732c(mqsiadm)
inode 1155126c(mqsiadm)

Now, for example 569506 is the process no. that uses a file in the current directory (c). Now how would I map the name of the file in the current directory, which is used by the process whose process id is 569506 ?? In simple terms I want the name of the file which is being used !!

Hope you get this !!

Can we map process no. in "ps" table ?? From there i would get the name of the file or not corrosponding to that process no. which i have got from fuser command??

Any light on this ???Smilie
# 6  
Old 09-14-2007
The only program I know that can do that is lsof which is a public domain utility. I'm not sure where to get a copy for AIX though. Once you have lsof, you can use:
lsof -p 569506
# 7  
Old 09-17-2007
Data

Quote:
Originally Posted by Perderabo
The only program I know that can do that is lsof which is a public domain utility. I'm not sure where to get a copy for AIX though. Once you have lsof, you can use:
lsof -p 569506
Hey,

As i am using AIX5.2 version., still i am not able to run the lsof command.
It says
ksh: lsof: not found.
Means in the korn shell, i am not able to get the reference of lsof command.
Couldn't run that !!

Whats up now ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help with copying the list of files from one location to other location

A) I would like to achive following actions using shell script. can someone help me with writing the shell script 1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using find . -name "*" -print | xargs grep -li 1367A49001CP0162 >... (1 Reply)
Discussion started by: GG2
1 Replies

2. Shell Programming and Scripting

How to find a existing file location and directory location in Solaris box?

Hi This is my third past and very impressed with previous post replies Hoping the same for below query How to find a existing file location and directory location in solaris box (1 Reply)
Discussion started by: buzzme
1 Replies

3. Shell Programming and Scripting

How to copy a file from one location to another location?

I have file file1.txt in location 'loc1'. Now i want a copy of this file in location 'loc2' with a new file called test.txt. Please help me how to do this in shell script. (1 Reply)
Discussion started by: vel4ever
1 Replies

4. Shell Programming and Scripting

File created in a different location instead of desired location on using crontab

Hi, I am logging to a linux server through a user "user1" in /home directory. There is a script in a directory in 'root' for which all permissions are available including the directory. This script when executed creates a file in the directory. When the script is added to crontab, on... (1 Reply)
Discussion started by: archana.n
1 Replies

5. Solaris

inode table in sun solaris

Hi, I would like to is it possible to repair inode table in solaris without running fsck? I am facing this issue in root file system, because to run fsck I have to bring system in single user mode with booting cdrom media. I facing strange issue in /var/adm/messages it is showing inode table... (12 Replies)
Discussion started by: manoj.solaris
12 Replies

6. Shell Programming and Scripting

Help on Moving files from one location to another location

Hi, I am new to unix and shell scripting. Please help me in resolving the below issue. In my shell script I have a variable which stores the different files with the path. Now I need to move all the files one by one to another location. ---- 1.... (4 Replies)
Discussion started by: kpagadala
4 Replies

7. Shell Programming and Scripting

Shell Script for Copy files from one location to another location

Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
Discussion started by: allways4u21
2 Replies

8. Shell Programming and Scripting

Put one string from one location to another location in a file

Hi Everyone, I have 1.txt here a b c' funny"yes"; d e The finally output is: here a b c d e' funny"yes"; (1 Reply)
Discussion started by: jimmy_y
1 Replies

9. Shell Programming and Scripting

Transfer files from one location to another location

Hi, i have to transfer of files of User1 located in Location1 to user2 located in Location2 using shell script. Please suggest me. (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

10. UNIX for Advanced & Expert Users

copy files from one location to similar location

I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure, say location 1, /home/rick/tmp_files/1-12/00-25/ here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
Discussion started by: pharos467
1 Replies
Login or Register to Ask a Question