- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Finding path name from its inode number
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 12:28 PM
тАО07-23-2002 12:28 PM
Finding path name from its inode number
I have a similar problem with 'ncheck -i'.
Is there an easy way to find the file path name, given the (VxFS) inode number?
Mladen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 12:31 PM
тАО07-23-2002 12:31 PM
Re: Finding path name from its inode number
Since their aren't any pointers from the file header back to the directory structure, I think you have to use find.
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 12:45 PM
тАО07-23-2002 12:45 PM
Re: Finding path name from its inode number
The file system's mount point is also given.
But this file system is over 60 Gb in size, with more than 600000 inodes. Thanks,
Mladen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 12:48 PM
тАО07-23-2002 12:48 PM
Re: Finding path name from its inode number
At the risk of sounding sarcastic, this is an example of why it helps to divide (and conquer) large numbers of files into directories. I don't think you have any other solution to speeding searches up.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 01:18 PM
тАО07-23-2002 01:18 PM
Re: Finding path name from its inode number
This should be sufficient:
find ${fs} -xdev -inum ${inode}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-23-2002 10:51 PM
тАО07-23-2002 10:51 PM
Re: Finding path name from its inode number
Consider the following example :
This is an entry from the audit subsystem :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
020206 09:57:24 7237 S 15 7068 33 0 3 0 3 157:0x000002
[ Event=chmod; User=wroot; Real Grp=sys; Eff.Grp=sys; ]
RETURN_VALUE 1 = 0;
PARAM #1 (file path) = 1 (cnode);
0x40000003 (dev);
1380 (inode);
(path) = .profile
PARAM #2 (int) = 384
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You only have the device and the inode. It can reside in any directory.
HeCou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2002 07:07 AM
тАО07-24-2002 07:07 AM
Re: Finding path name from its inode number
The problem is not too important, but I appreciate your comments and suggestions.
The file system in question has been created for Netscape Mail Server data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-24-2002 07:16 AM
тАО07-24-2002 07:16 AM
Re: Finding path name from its inode number
If the file system is accumulating new files daily, could you right a program that looked for new files, collect the inode/pathname info, and write it to an index file.
Then when you wanted to lookup an inode, you would read it from the index file.
This way you can prevent re-reading through the file system each time you want to look for an i-node.
Usually the only time I've had to lookup a file based on i-node is when debugging an application. So the wait time for the scan is not as important.
Good Luck
-- Rod Hills