From owner-freebsd-questions@FreeBSD.ORG Thu Jan 22 22:13:04 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 325CC16A4CE; Thu, 22 Jan 2004 22:13:04 -0800 (PST) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 81B4D43D48; Thu, 22 Jan 2004 22:13:00 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i0N6CxLE030685; Fri, 23 Jan 2004 17:12:59 +1100 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i0N6CuEf015211; Fri, 23 Jan 2004 17:12:57 +1100 Date: Fri, 23 Jan 2004 17:12:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Eric In-Reply-To: Message-ID: <20040123164945.N18042@gamplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: freebsd-questions@freebsd.org Subject: Re: problems with filesystems > 1TB X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2004 06:13:04 -0000 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 . 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