Mapping abs sector numbers to files

Gary Heston gary at sci34hub.sci.com
Fri Jun 7 23:29:59 AEST 1991


In article <767 at dumbcat.sf.ca.us> marc at dumbcat.sf.ca.us (Marco S Hyman) writes:
>I haven't found this in TFM yet -- perhaps the net can help.  Given an error
>message that says something like "SCSI absolute sector 1234 on drive 1 is bad"
>how can I map this sector number to a file/directory/(inode!).  I've looked at
>/etc/partitions and can figure out what partition the error is in (I think)
>but the intricacies of fsdb escape me.  Perhaps there is more doc than the man
>page available?  Some other hidden gem?  Something so obvious I'll be forever
>embarrassed that I missed it?  Anything!

I have run into this problem in the past, and came up with a fairly simple
work-around that narrows it down to which file contains the bad sector:

	tar -cvf /dev/null /

and watch for the error to hit.

This works with tar because tar displays the filename when it starts trying
to read it; whereas cpio deals with the file and then displays the name.

You can, of course, redirect the output.

-- 
Gary Heston   System Mismanager and technoflunky   uunet!sci34hub!gary or
My opinions, not theirs.    SCI Systems, Inc.       gary at sci34hub.sci.com
I support drug testing. I believe every public official should be given a
shot of sodium pentathol and ask "Which laws have you broken this week?".



More information about the Comp.unix.sysv386 mailing list