Can I derive an inode # from an absolute sector #?

John Bruner bruner at uicsrd.csrd.uiuc.edu
Fri Feb 23 01:44:12 AEST 1990


In article <24 at hite386.UUCP> steve at hite386.UUCP (Steve Hite) writes:
>    I have 386/ix v2.0.2.  Recently, I had gotten an absolute sector read
>error report.  I have called Interactive tech support about this in the past
>and they couldn't tell me explicitly how to find out the inode # if there
>is a disk error giving the absolute sector # as the problem spot on the hard
>disk.  Can it be done?  How? ...

The old filesystem consistency program "icheck" will do what you want.
Vendors often provide icheck/dcheck/ncheck with their ports (particularly
V7-derived ones like BSD, SunOS, etc.)  If Interactive supplied it, you
can get the inode number with the command:

	icheck -b blockno device

where "blockno" is the block number within device "device".  Use the
raw device if possible.

You can get the filenames which reference this inode (the (hard) links
to the file) with "ncheck":

	ncheck -i inode device

Again, use the raw device and be prepared to wait a while if the
filesystem is large.

Both of these commands are safe to use while the filesystem is mounted,
although given the device errors I probably would do it in single-user
mode with the filesystem unmounted.
--
John Bruner	Center for Supercomputing R&D, University of Illinois
	bruner at uicsrd.csrd.uiuc.edu	(217) 244-4476	



More information about the Comp.unix.i386 mailing list