Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Apr 2003 16:25:41 -0700
From:      Joshua Oreman <oremanj@webserver.get-linux.org>
To:        Heinrich Rebehn <rebehn@ant.uni-bremen.de>
Cc:        questions@freebsd.org
Subject:   Re: newfs parameters for a 500 GB volume ?
Message-ID:  <20030407232541.GA8006@webserver.get-linux.org>
In-Reply-To: <3E8BD9F7.4050404@ant.uni-bremen.de>
References:  <3E8BD9F7.4050404@ant.uni-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Apr 03, 2003 at 08:51:35AM +0200 or thereabouts, Heinrich Rebehn wrote:
> I am going to set up a RAID 0 array with two 250G drives, making 500G.
> Which newfs parameters would you recommend for it?

I have no volumes that big, but for my /usr partition (60 GB), I just used
the standard params. I don't think you want to do that.

> I am afraid of ending up with a fs with Gigs of space and no inodes
> left, 

You want the inode density parameter (newfs -i whatever)

> or a fs that is heavily fragmented and slow.

and block size (newfs -b whatever).

> Reading the newfs manpage didn't quit help me, it explains all switches
> The files on the volume will be 2 MB average.
>

This should work:
	# newfs -U -i 2000000 -b 32768 -f 4096 /dev/foo

However, you may want to be more liberal with the -i parameter (lower it) or
the -b parameter (raise it).  Note that the -f parameter must be 1/8 of the
-b parameter and a power of 2.

The -i option specifies the inode density -- one inode will be created for every
X bytes on the FS, where X is the argument.

The -b option specifies the block size. The default is 16384, but that will waste some
space for larger filesystems. Make this a power of two.

The -f option specifies the fragment size. It should always be 1/8 the block size, and
it also must be a power of two.

If you want, you can use -g instead of -i to tell newfs the avg file size, which it
may change a bit to make the inode density.

You probably do not need to use any of the other flags. (-U makes it soft-updates.)

Note that these parameters are just my best guess. I take no responsibility if your
FS isn't up to par with your expectations. man tunefs(8) for more information about
how to set the other flags (most of which you can change after newfs). As always,
YMMV.

> 
> Thank you for any suggestions or pointers.
> 
Hope this helps,
-- Josh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030407232541.GA8006>