[comp.sources.wanted] Program to map blocks in files

woerz@iaoobelix.UUCP (Dieter Woerz) (06/02/88)

Hello world,

I like to know, if someone has (already written) a program which maps
block on a special device to the inode of the file, which is using that
block or better yet, to all filenames using that block.

I need this to be able to remove files on a bad block, so this block can
be inserted into the bad block list. I don;t want to reformat the disk for
every bad disk block.

Thanks in advance

------------------------------------------------------------------------------

Dieter Woerz
Fraunhofer Institut fuer Arbeitswirtschaft und Organisation
Abt. 453
Holzgartenstrasse 17
D-7000 Stuttgart 1
W-Germany

BITNET: iaoobel.uucp!woerz@unido.bitnet
UUCP:   ...{uunet!unido, pyramid}!iaoobel!woerz

root@cca.ucsf.edu (Computer Center) (06/03/88)

See summary.

Of course, your vendor may have left this out as some recent
systems have.

Thos Sumner       (thos@cca.ucsf.edu)   BITNET:  thos@ucsfcca
(The I.G.)        (...ucbvax!ucsfcgl!cca.ucsf!thos)

OS|2 -- an Operating System for puppets.

#include <disclaimer.std>

woerz@iaoobelix.UUCP (Dieter Woerz) (06/17/88)

In article <1274@ucsfcca.ucsf.edu> root@cca.ucsf.edu (Computer Center) writes:
>
>See summary.
>
>Of course, your vendor may have left this out as some recent
>systems have.

Root@cca.ucsf.edu mentioned to use icheck for mapping blocks to
inodes, but icheck doesn't do what I want to do. Perhaps I didn't
state this clearly.
I have some block numbers (normally logged by the system as bad) and
I want to know, what file is using the Block, I want the inode of
this file or, even better, it's name (s, if it has hard links), so
that I can hopefully save the file before marking the block as bad.

Hope this clarifies the request

Thanks in advance

------------------------------------------------------------------------------

Dieter Woerz
Fraunhofer Institut fuer Arbeitswirtschaft und Organisation
Abt. 453
Holzgartenstrasse 17
D-7000 Stuttgart 1
W-Germany

BITNET: iaoobel.uucp!woerz@unido.bitnet
UUCP:   ...{uunet!unido, pyramid}!iaoobel!woerz

root@cca.ucsf.edu (Computer Center) (06/21/88)

In article <181@iaoobelix.UUCP>, woerz@iaoobelix.UUCP (Dieter Woerz) writes:
> 
> Root@cca.ucsf.edu mentioned to use icheck for mapping blocks to
> inodes, but icheck doesn't do what I want to do. Perhaps I didn't
> state this clearly.
> I have some block numbers (normally logged by the system as bad) and
> I want to know, what file is using the Block, I want the inode of
> this file or, even better, it's name (s, if it has hard links), so
> that I can hopefully save the file before marking the block as bad.
> 
> Hope this clarifies the request
> 
> Dieter Woerz

What you describe is precisely what icheck does via its -b option.
If your icheck doesn't have the -b option it is badly broken. Complain!

Since icheck is filesystem oriented the block numbers are given with
respect to the filesystem. If you know only the absolute device block
numbers (e.g. from a standalone diagnostic program) then you need to
apply the correction for the filesystem origin.

The ncheck utility will map the i-node numbers generated by icheck to
the path-names which correspond.

Thos Sumner       (thos@cca.ucsf.edu)   BITNET:  thos@ucsfcca
(The I.G.)        (...ucbvax!ucsfcgl!cca.ucsf!thos)

OS|2 -- an Operating System for puppets.

#include <disclaimer.std>