Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2002 09:37:18 -0600
From:      "Mike Meyer" <mwm-dated-1011281839.5e9038@mired.org>
To:        F.Xavier Noria <fxn@isoco.com>
Cc:        questions@freebsd.org
Subject:   Re: Advice on creating partitions
Message-ID:  <15424.22574.995107.46777@guru.mired.org>
In-Reply-To: <104714125@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
F.Xavier Noria <fxn@isoco.com> types:
> I've got a new computer with RAM 256 DDR and 21GB of its hard disk
> reserved for FreeBSD.
> 
> I have no clue about what partitions should I create and what size
> should they have since in previous installations I just followed the
> 3xRAM rule for swap and the rest was under /.

This comes up a lot, and there are lots of opinions. BTW, the rule for
swap is 2xRAM, not 3x. The other two numbers to consider for swap are
0, if you don't think you'll ever swap and don't want kernel dumps if
you crash, and RAM + 64K if you want kernel dumps. If you're going to
run a lightweight windowing enviroment and aren't going to do any
graphics processing, no swap might be a reasonable answer. If you're
going to put /tmp on an mfs file system, you'll have to provide room
for that as well.

> This is going to be an average desktop computer, for playing around,
> programming and so forth. After reading the relevant parts of the
> Handbook and "The Complete FreeBSD", I've come with this temptative
> settings:
> 
>     /     200MB
>     swap  800MB
>     /var  300MB  + SoftUpdates
>     /usr  <rest> + SoftUpdates
> 
> and /tmp would be symlinked to /usr/tmp to make sure I do not run out of
> space there (is that reason reasonable in fact?). I don't need to be
> conservative because I have a lot of room, would you think those are
> suitable partitions?

Here's something to take into consideration when doing such things:
splitting a file system into two file systems replaces one thing that
can run out of space with two such things, making it twice as likely
that you'll run out of space. Therefore, you want as few file systems
as you can get away with.

Which leaves the question: why create more than one file system? The
answer is because you want to handle them differently with tools that
act on entire file systems. Those are things like mount, nfs, dump,
and newfs. Note that I said file systems, not partitions. Swap doesn't
use a file system, but needs it's own partition. I'm going to ignore
it from here on out.

If you're not going to back things up or do any nfs mounts, then I'd
recommend two file systems: / at about 4GB, and everything else as
/home. The reason for that is that you can newfs / and do a fresh
install of a newer system without destroying your personal data.

If you want to back up critical things, but not do nfs, I'd make it
three partitions: / at 100 MB or so, /usr at ~4GB, and /home as the
rest. You can then dump /, which will have all the critical system
configuration information plus any oustanding mail, etc. stuff on
it, and /home. What's on /usr can be recreated from things on the
network and the stuff backed up with /.

If you want to mount / read-only for extra security, you'll need to
split /var off from /. 100MB is more than enough for /var doing the
things you've mentioned. You don't need to split /usr off from it, but
will probably want to so that you can install ports and the like
without having to reboot to single user mode.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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