Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Feb 2012 23:46:23 +0100
From:      Polytropon <freebsd@edvax.de>
To:        david.robison@fisglobal.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: One or Four?
Message-ID:  <20120217234623.cf7e169c.freebsd@edvax.de>
In-Reply-To: <4F3ECF23.5000706@fisglobal.com>
References:  <4F3ECF23.5000706@fisglobal.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Four? There should be five! :-)

Read on to find out why.



On Fri, 17 Feb 2012 14:05:23 -0800, Robison, Dave wrote:
> We'd like a show of hands to see if folks prefer the "old" style default 
> with 4 partitions and swap, or the newer iteration with 1 partition and 
> swap.

In my case, preference depends on use. When I'm unable to
predict how partition occupation will develop, going with
one / partition is a good approach. It can also be useful
for cases like home desktops.

Other cases, like dedicated servers or systems that use
more than one physical disk (e. g. one system disk, one
home disk) the approach of using more than one partition
is welcome.

I'd like to mention that using different partitions for
a logical separation of mechanisms and functionalities
can be a _big_ help in worst case (which you'll hopefully
never will encounter, but be prepared). For example, if
you have file system trouble with the /home partition,
you can bring the system up in a limited state (SUM),
make the partition "ro" and get the data. You can then
boot the system into the normal state (MUM) with using
the copy you made, leaving the original /home partition
unmounted and untouched. In case of data recovery and
forensic analysis this can be your chance to get your
data back.



> We realize that one can use bsdinstall to create as many partitions as 
> one wants. However, the new default is for one partition and swap. We 
> want to know if people would prefer the older style default with four 
> partitions and swap when selecting "Guided Partitioning" and "Use Entire 
> Disk".

Well, to be honest, I never liked the "old style" default
with /home being part of /usr. As I mentioned before, _my_
default style for separated partitions include:

	/
	swap
	/tmp
	/var
	/usr
	/home

In special cases, add /opt or /scratch as separate partitions
with intendedly limited sizes.

You can see that all user data is kept independently from
the rest of the system. It can easily be switched over to
a separate "home disk" if needed.

What's the reason for this? Limited partitions are often
considered a problem, but they can be a system's life saver.
Just imagine you have all functional parts of the system in
one big / tree, let's also say /tmp is writable for users
(and it's not a memory file system); now a maliciously acting
user or program could fill /tmp with lots of data, occupying
the full disk. Soon, /var/log cannot be written anymore, and
also other processes that need to write something may get
into trouble. If /tmp is a separate partition, only /tmp can
get "out of disk space", with /var being fully untouched.

Also keep in mind that some tools like to operate on partition
level, such as dump (and restore). System tools like quota can
also be used on a partition level. As I mentioned before, being
able to mount a partition read-only can be helpful sometimes,
same goes for other mount options, such as noexec or noatime.
When dealing with this low level stuff is neccessary (e. g. on
embedded systems or systems that are low on resources where you
need to squeeze every bit of performance by fine tuning), having
individual partitions can be a big help.



> Let the majority decide which layout is preferred for the default.

Why not add a selection to the installer, something like
this:

	Partition scheme
	----------------

	[ ] all in one + swap
	    Create one partition containing all subtrees
	    plus one swap partition.

	[ ] separate partitioning + swap
	    Create /, /var, /tmp and /usr (including home)
	    partitions plus one swap partition.

	[ ] user-defined
	    Make your own partitioning selection manually.

Of course, the default SIZES for second choice should be
reasonable.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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