On Wed, 21 Jan 2004, Eric wrote:

> i have been trying (for many moons now) to create a filesystem larger than
> 1TB. I've had a variety of RAID controllers in my boxes, and I have 250GB
> drives, so it adds up quick. I've also tried doing this with vinum, but
> that fails too.
>
> i've searched for help on this topic, and i've found lots of info, but
> nothing substantial. I've read everything from it being a sysinstall
> issue, to needing new versions of the CLI tools (newfs, dd, disklabel), to
> newfs using the wrong variable type to store fssize, to having to update
> to fbsd 5.x to use UFS2.

This requires FreeBSD-5.x and either UFS2 or fixing an overflow bug
in UFS1 (and possibly other bugs).  Only file system sizes much larger
than 1TB require UFS2 (UFS1 starts losing at 4TB but but can handle
128TB (poorly)).

FreeBSD 4.x has a limit of 2^31 blocks of size 512 for i/o.  This gives
a limit of 1TB.

UFS1 has a limit of 2^31 blocks of size <fs block size>.  I forget
whether relevant block size is what is called the block size or the
fragment size in newfs.  Probably the latter; I will assume this in
the following examples.  This gives the same limit of 1TB if the
fragment size is 512.  However, with the default fragment size of 2K
the limit is 4TB, and UFS1 can reasonably support a few more doublings
of the file system size using a few more doublings of the fragment
size.  However2, UFS1 has an overflow bug converting fs block numbers
to i/o block numbers.  Overflow occurs at i/o block number 2^31 so
there is the same 1TB limit as in systems that have a limit of 2^31
on the i/o block number.

> Other reports say it's a softlimit imposed
> somewhere, some say to make the frag size in newfs to 1024B for a 2TB max
> volume, it has to be dedicated, it has to be non-dedicated... the list of
> suggestions goes on and on.

For UFS1, this only works in FreeBSD-5.x with an overflow bug (and
possibly other bugs) fixed.

Fix for an overflow bug:

%%%
Index: fs.h
===================================================================
RCS file: /home/ncvs/src/sys/ufs/ffs/fs.h,v
retrieving revision 1.40
diff -u -2 -r1.40 fs.h
--- fs.h        16 Nov 2003 07:08:27 -0000      1.40
+++ fs.h        16 Nov 2003 11:30:26 -0000
@@ -491,5 +491,5 @@
  * This maps filesystem blocks to device size blocks.
  */
-#define fsbtodb(fs, b) ((b) << (fs)->fs_fsbtodb)
+#define        fsbtodb(fs, b)  ((daddr_t)(b) << (fs)->fs_fsbtodb)
 #define        dbtofsb(fs, b)  ((b) >> (fs)->fs_fsbtodb)

%%%

Bruce
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to