Subject: Re: Large disk support in NetBSD, is it hard to do and is anyone working on it?
To: None <>
From: Brian Buhrow <>
List: current-users
Date: 04/23/2006 21:57:01
	I don't think that will work.  Here's where I think my trouble is.
The d_secperunit field in the disklabel structure, see below, is a 32-bit
field.  That means that when raidframe is summing up all of the sectors in
the raid set, it wraps and starts over when it constructs the raid label
for the final raid set.  Since my first writing, I've confirmed that this
is happening by re-writing the disklabels for the component disks to insure
that the total sector count for the combined raid set doesn't exceed 2^32
sectors.  Now, the numbers in the disklabel for the raid look right, and ffs
does the right thing when newfs runs.
	From what I can tell, it's not possible to have any logical disk be
larger than 2^32 sectors in size under NetBSD.  At least, not one which
uses a disk label.  Am I mistaken here?

/*	$NetBSD: disklabel.h,v 1.90 2005/01/07 18:29:15 matt Exp $	*/
[ ... ]
#ifndef _LOCORE
struct disklabel {
 [ ... ]
			/* disk geometry: */
	u_int32_t d_secsize;		/* # of bytes per sector */
	u_int32_t d_nsectors;		/* # of data sectors per track */
	u_int32_t d_ntracks;		/* # of tracks per cylinder */
	u_int32_t d_ncylinders;		/* # of data cylinders per unit */
	u_int32_t d_secpercyl;		/* # of data sectors per cylinder */
	u_int32_t d_secperunit;		/* # of data sectors per unit */
[... snip...]
On Apr 24, 12:03am, Thor Lancelot Simon wrote:
} Subject: Re: Large disk support in NetBSD, is it hard to do and is anyone 
} On Sun, Apr 23, 2006 at 08:35:58PM -0700, Brian Buhrow wrote:
} > 	Hello folks.  I've just spent the day building a new raid array
} > comprised of 7 500GB disks.  This is a raid 5 array, meaning I'm proposing
} > to build something close to a 3TB array.  After configuring all the disks,
} > initializing the array, and calculating parity on it, I discovered that the
} > NetBSD disklabel can only count up to 2^32 sectors on any given disk.  In
} > looking at the current sources on cvsweb, it appears that -current still
} > has this limitation.
} > 	Does anyone have any suggested work arounds for how to create logical
} > disks larger than  2.1TB?  Also, should I file a bug on this one or is it a
} > well known enough problem that it will get taken care of sooner or later?
} Can you use the raw partition of the disk?  The disklabel should then be
} ignored, so should not be an issue.
} Thor
>-- End of excerpt from Thor Lancelot Simon