Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!lll-winken!uunet!mcvax!kth!sunic!chalmers!ce.chalmers.se!afs-news!cert3!tropp From: tropp@ce.chalmers.se. (Ulf Tropp) Newsgroups: comp.unix.wizards Subject: Re: Location of bad blocks Keywords: bad blocks Message-ID: <481@vice2utc.chalmers.se> Date: 9 May 89 07:40:15 GMT References: <146@wybbs.UUCP> Sender: news@vice2.utc.chalmers.se Reply-To: tropp@ce.chalmers.se (Ulf Tropp) Organization: Chalmers University of Technology, Gothenburg, Sweden. Lines: 20 In article <146@wybbs.UUCP> voorst@wybbs.UUCP (Dale Van Voorst) writes: >Does a program exist that will tell you what file, if any, a bad block is >being used by, given one or all of the following: (head/cylinder/sector)? > Try icheck(8) and ncheck(8). icheck -b blocknumber specialdevice will propably give you the inode the block is owned by (or the free list). ncheck -i inode specialdevice will then give you the filename(s). Sometimes the inode(s) itself is in a bad block. The information given by icheck is somewhat system specific. If your vendor has decided that these commands are obsolete, since fsck(8) is much better, you are out of luck. Blocknumber is of course calculated from head/cyl/sec and the geometry of the disk, but beware that the numbers reported may be relative to the beginning of the disk, not the beginning of the file system. There may be a program called fsdb(8?) on your system, but i know nothing about that one. This procedure works in v7 and BSD, so you have a chance. Ulf Tropp, tropp@ce.chalmers.se