Subject: Re: newfs can't make filesystems over 1TB in size
To: Brian Buhrow <buhrow@lothlorien.nfbcal.org>
From: Luke Mewburn <lukem@netbsd.org>
List: current-users
Date: 12/07/2002 11:50:04
On Fri, Dec 06, 2002 at 10:14:54AM -0800, Brian Buhrow wrote:
  | 	Hello Jaromir.  According to the document you reference, the fragment
  | size must only be 2K to create a 4TB filesystem.  The filesystem I'm trying
  | to create has a fragment size of 4K, and a block size of 16K.  The problem
  | seems to be in newfs itself.  The variable llsize is taken to be the size
  | of the filesystem, and llsize is a long long.  However, the filesystem size
  | is passed to mkfs() inside fssize, which is a signed 32-bit integer.  I
  | think here-in  lies the problem.

The kernel uses daddr_t to access underlying disk sectors.
daddr_t == int32_t == 2^31.
With 512 byte (2^9) sectors, 2^9 x 2^31 == 2^40 == 1TB.

If I recall correctly, we don't cleanly support larger sectors yet.

Luke.