Bad blocks, inodes and .badblocks -> Make root inode 2

Bad blocks, inodes and .badblocks -> Make root inode 2

Post by Jim Segra » Fri, 24 Jul 1992 05:53:49



Following is a suggestion for a minor change to the filesystem which (I hope)
should make the system slightly more robust.

----------

Traditionaly UNIX uses inode 2 for its root inode, (whereas Linux uses
inode 1, a holdover from minix), and inode 1 is not allocated.

I suspect that this inode (1) was originally used for a bad blocks file,
like .badblocks, which *did not* appear anywhere in the file system.

From what I have seen of System V systems the use of inode 1 in this manner
seems to have ceased and the file system now has its bad blocks remapped
to good ones making the whole filesystem appear to be good.

May I therefore suggest that we follow the original (?) practice, namely use
inode 2 for the root and an unattached inode 1 for the bad block file. This
will allow people with MFM drives (such as myself) to (almost) act as if we
have a perfect drive. We still won't be able to read the device but it will
prevent accidents from happening when the bad block file is accessed or
deleted (mcc interim 96c nearly got me :) ).

It will also incidentally bring us in line with the rest of the UNIX world.
If we are to make this change then, with the extended file system here and
a FFS on the horizon, we should make it soon before the current organisation
becomes too widespread.

Obviously this will also require that fsck and mkfs are updated, but those
are fairly minor changes (which I would be willing to do.)

Cheers,

Derek Fawcus

A utility could be written to allow swapping a pair of inodes would
allow users who don't wish to re-mkfs their discs to move .badblocks to
inode 1

--

 
 
 

Bad blocks, inodes and .badblocks -> Make root inode 2

Post by Rick Emers » Sun, 26 Jul 1992 06:44:25



> Following is a suggestion for a minor change to the filesystem which (I hope)
> should make the system slightly more robust.

> ----------
> [change and justification omitted]
> Obviously this will also require that fsck and mkfs are updated, but those
> are fairly minor changes (which I would be willing to do.)

I like the idea and agree with your reasoning.  

Quote:> Cheers,

> Derek Fawcus

> A utility could be written to allow swapping a pair of inodes would
> allow users who don't wish to re-mkfs their discs to move .badblocks to
> inode 1

Now, if you were to also add a non-destructive mkfs to detect new spots that
are marginal (or worse!), I suspect that your name would be placed in
nomination for public acclaimation and perhaps even presented for the
Birthday Honors List (right after Owen for coming up with mcc-interim)!
<grin>

Rick

| Richard B. Emerson     | Replies may be sent to:                         |

| Post Office Box 180    |-------------------------------------------------+
| Lansdale, PA 19446 USA |     "If I knew what I was doing,                |
| Voice: 215.855.1607    |      I wouldn't do it." - Me                    |

 
 
 

1. inode blocks/cyl group (377) >= data blocks (224)

Had a look on sunsolve and it gave the following, it's of some use.......

SRDB ID   4030
Synopsis : newfs fails with: warning: inode block/cyl group...

Problem Description :-

Running newfs on a partition may give the following message:

Warning: inode blocks/cyl group (xx) >= data blocks (xx) in last
                     cylinder group

This implies xxx sector(s) cannot be allocated. Some of these numbers will
vary, depending on the size of the partition.

Problem Solution :-

This is just a warning. The filesystem should be fine. The message is just
saying that some sectors will not be used by the filesystem.

This message can be eliminated by changing the number of
cylinders in the partition (a number evenly divisible by 16).


2. fopen cant open more then 256 files

3. Flagging bad blocks/inodes in Solaris 2.6

4. Share Memory Configuration

5. mapping bad blocks to inodes

6. Is keyboard module (kb) arch-dependent in Solaris 2.5?

7. Bad root inode

8. looking for Interviews DOC manual

9. Mapping block -> inode #?

10. Does Inode with bad node inevitably mean a bad hard drive?

11. >>> Inodes and Vnodes <<<

12. I have filled up with inodes on /usr, can I change inode withour reinstall?

13. grow inodes: inode-max limit reached error.