newfs parameters for a 500 GB volume ?
oremanj at webserver.get-linux.org
Mon Apr 7 16:23:14 PDT 2003
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
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,
> Thank you for any suggestions or pointers.
Hope this helps,
More information about the freebsd-questions