Subject: Re: large FFSv2 -> file system corruption
To: Eric Haszlakiewicz <erh@nimenees.com>
From: Darrin B. Jewell <dbj@netbsd.org>
List: current-users
Date: 07/22/2004 12:38:26
Eric Haszlakiewicz <erh@nimenees.com> writes:

> On Wed, Jul 21, 2004 at 07:02:39PM +0300, Arto Huusko wrote:
> > There's also this patch to ld(4), by Darrin:
> > 
> > 	http://mail-index.netbsd.org/source-changes/2004/07/20/0016.html
> > 
> > IIRC, you were using ld(4). Dunno if it makes any difference.
> 
> 	hmm... ld's secperunit and disklabel's are now different sizes.
> That's probably not a good thing, although it doesn't seem to be used for
> much other than calculating the size of the raw partition.
> 
> eric

A check and truncate for this could be put in the ld.c, but i don't
see a particular problem with having the device secperunit larger than
the disklabel.  We're going to need to fix the disklabel soon anyway.

The main bug that patch fixed was that the disklabel is unsigned 32
bits while the secperunit was signed.  I bumped it to 64 bits because
we're going to want to someday anyway, but right now it has to hold at
least as much as the disklabel can.

If you're using filesystems above 1tb, you also need to see:

  http://mail-index.netbsd.org/tech-kern/2004/07/20/0002.html

I've been using ufs2 filesystems 4k frags /32k blocks fragments on ld0
with 4294967295 (0xffffffff) sectors with those patches.  This is just
shy of 2tb in size.  It works for me.

Darrin