On Thu, Jul 19, 2007 at 08:09:58PM +0200, Otto Moerbeek wrote:
> [...]
>
> I misdiagnosed the problem. In the meantime I got another report with
> a dd of the partition which enabled me to diagnose the problem and
> make a fix for 4.1. Please test and report back. I'll be on vacation
> from Saturday, so it would be nice if you can answer before that.
>
> Anobody else seeing INCONSISTENT CGSIZE messages should try this as well.
>
> NOTE: this diff only applies to 4.1. Current does not have the
> problem, due to a corrected CGSIZE macro.
>
> -Otto
>
> Index: setup.c
> ===================================================================
> RCS file: /cvs/src/sbin/fsck_ffs/setup.c,v
> retrieving revision 1.29
> diff -u -p -r1.29 setup.c
> --- setup.c 16 Feb 2007 08:34:29 -0000 1.29
> +++ setup.c 19 Jul 2007 18:02:36 -0000
> @@ -336,6 +336,7 @@ setup(char *dev)
> sbdirty();
> dirty(&asblk);
> }
> +#if 0
> if (sblock.fs_cgsize != fragroundup(&sblock, CGSIZE(&sblock))) {
> pwarn("INCONSISTENT CGSIZE=%d\n", sblock.fs_cgsize);
> sblock.fs_cgsize = fragroundup(&sblock, CGSIZE(&sblock));
> @@ -346,6 +347,7 @@ setup(char *dev)
> dirty(&asblk);
> }
> }
> +#endif
> if (INOPB(&sblock) != sblock.fs_bsize / sizeof(struct ufs1_dinode)) {
> pwarn("INCONSISTENT INOPB=%d\n", INOPB(&sblock));
> sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs1_dinode);
>
>
I had a power failure here (power company was doing maintenance and
repeatedly switched power off and on...)
Both my 4.1 boxen ran into this. The patch fixed the BLK 64 issues, but
i have a partition made with a larger blocksize (defaults * 2), that
couldn't be fixed (BLK 128). bsd.rd from snapshots did the trick... Just FYI
Tobias