Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2000 15:57:10 +0930
From:      Greg Lehey <grog@lemis.com>
To:        tony@aracnet.com
Cc:        questions@FreeBSD.ORG
Subject:   Re: Filesystem sizes for 4.x ?
Message-ID:  <20000830155709.A34589@wantadilla.lemis.com>
In-Reply-To: <200008300611.XAA31925@shell1.aracnet.com>; from tony@aracnet.com on Tue, Aug 29, 2000 at 11:11:25PM -0700
References:  <200008300611.XAA31925@shell1.aracnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, 29 August 2000 at 23:11:25 -0700, tony@aracnet.com wrote:
>
> Can anyone give me the recommended filesystem sizes for FreeBSD 4.1 ?
>
> I've been upgrading from source since 2.0, upgrade to 3.x was painful
> as I ran out of space on / and /usr (had to start deleting unneeded binaries).
>
> Meant to repartition and rebuild 3.x but never got around to it, so will be
> dealing with this when I upgrade to 4.1.
>
> Couldn't find any mention of this in the release notes, FAQ, handbook or
> archives. If anyone knows where I could have found the info, short of
> trying a reinstall, LMK.

There are lots of different opinions about the correct size of file
systems.  You're welcome to mine.  Here's a repeat of something I sent
a couple of days ago.

Greg

What size partitions?
_____________________

In our example, we have 20 GB of space to divide up.  How should we do it?  You
don't  have  to  worry about this issue, since sysinstall will do it for you if
you ask it, but we'll see below why this might not be the best choice.  In this
section  we'll  consider how UNIX file systems have changed over the years, and
we'll look at the issues in file system layout nowadays.

When UNIX was young, disks were tiny.  By the time  of  the  Third  Edition  of
UNIX,  in 1972, the system disk was a Digital RF-11, a fixed head disk with 512
kB.  It was no longer possible to keep the entire system on  this  disk,  so  a
second  file  system became essential.  It was mounted on a Digital RK03 with 2
MB of storage.  To quote from a paper published in the  Communications  of  the
ACM in July 1974:

   In  our  installation,  for  example,  the  root directory resides on the
   fixed-head disk, and the large disk drive, which contains  user's  files,
   is mounted by the system initialization program...

As  time  went  on,  UNIX  got bigger, but so did the disks.  By the early 80s,
disks were large enough to put / and /usr on the same disk, and it  would  have
been  possible  to  merge  /  and  /usr,  but they didn't.  Since that time, an
additional file system, /var, has come into common use for  frequently  changed
data.  This is what sysinstall does by default:

         [Omitting PostScript image images/disk-label-default.ps 4i  ]
                   Figure 6-12: Default disk partition sizes

It's  relatively  simple  to  estimate  the  size  of the root file system, and
sysinstall's value of 50 MB is fine.  But what about /var?  20 MB  isn't  worth
the trouble any more.  In fact, both file systems put together would be lost in
the 19 GB of /usr file system.  Why do we still do things this way?  Let's look
at the advantages and disadvantages:

o If  you  write to a file system, a system crash can have serious consequences
  for the data integrity of that file system.

o If you have a crash and lose the root file system, recovery can be difficult.

o If a file system fills up, it can cause lots of trouble.  Most messages about
  file systems on the FreeBSD-questions mailing list are complaining about file
  systems  filling  up.   If you have a large number of small file systems, the
  chances are higher that one will fill up while space remains on another.

o In single-user mode,  only  the  root  file  system  is  mounted.   With  the
  classical  layout, this means that the only programs you can run are those in
  /bin and /sbin.  In order to run any other programs, you must first mount the
  file system on which they are located.

o It's  nice  to keep your personal files separate from the system files.  That
  way you can upgrade a system much more easily.

o It's very difficult to  calculate  the  sizes  of  some  file  systems.   For
  example,  on some systems /var can be very small, maybe only 2 or 3 MB.  It's
  hardly worth making a separate file system for that much data.  On the  other
  hand, other systems, such as ftp or web servers, may have a /var system of 50
  or 100 GB.  How do you choose the correct size for your system?

o When doing backups, it's a good idea to be able to get a  file  system  on  a
  single tape.

In  the  early  days  of  UNIX,  system crashes were relatively common, and the
damage they did to  the  file  systems  was  relatively  serious.   Times  have
changed,  and nowadays file system damage is relatively seldom, particularly on
file systems that have little activity.  On the other hand,  disk  drives  have
grown  beyond  most  peoples'  wildest expectations.  The first edition of this
book, only five years ago, showed how to  install  on  a  200  MB  drive.   The
smallest  disk  drives  in current production are 10 GB in size, more than will
fit on many tapes.

As a result of these considerations, I have  changed  my  recommendations.   In
earlier  editions  of  this book, I recommended to put a small root file system
and a /usr file system on the first (or only) disk on the system.  /var was  to
be a symbolic link to /usr/var.

This is still a valid layout, but it has a couple of problems:

o In  the  example  we're  looking  at,  /usr is about 19 GB in size.  Not many
  people have backup devices which can write this much data on a single medium.

o Many people had difficulty with the symbolic link to /usr/var.

As a result, I now recommend:

o Make a single root file system of between 2 and 4 GB.

o Do not have separate /usr or /var file systems.

o Use  the  rest  of the space on disk for a /home file system, as long as it's
  possible to back it up on  a  single  tape.   Otherwise  make  multiple  file
  systems.  /home is the normal directory for user files.

This  layout allows for easy backup of the file systems, and it also allows for
easy upgrading to a new system version: you just need to replace the root  file
system.   It's  not perfect, though: on a web server you probably wouldn't want
to put /var on the root file system.
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
Finger grog@lemis.com for PGP public key
See complete headers for address and phone numbers


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?20000830155709.A34589>