This looks like as good a place as any to hang this;
On Tue, Mar 07, 2000 at 09:14:34PM -0800, Matthew Dillon wrote:
> I'll tell ya, I *never* use the auto-defaults. They are way too
> tiny. A 50MB root barely fits the kernel and you can run it out of
> space doing an installworld. I almost always do this:
>
> / 128M
> swap (double system memory at a minimum)
> /var 128M
> /var/tmp 128M
> /usr (at least 1G)
> /u1 (remainder, if it's a big disk)
>
> /tmp softlink to /var/tmp (because having two tmp's is stupid)
> /home softlink to /u1/home
Here's a documentation of my current recommended practice which'll
probably turn in to an article somewhere in the doc/ tree some time.
Comments welcome.
N
Recommended disk and partition layout
In order to reduce space wastage, and provide a flexible partition layout
for future work, the following disk partition layout is recommended.
First, you need three 'standard' filesystems, of roughly this size:
/ 50m
/var 50m
/usr 250m
A 50m / should be sufficient for static /bin and /sbin, as well as /etc,
other configuration files, and a local /tmp.
Similarly, a 50m /var covers most log files, assuming the machine isn't
doing anything too log intensive. Don't worry about the size of incoming
and outgoing mail spools, or the print spooler at the moment.
Finally, a 250m /usr covers all the standard stuff, and leaves room for
expansion in the future.
Now, create one more filesystem,
/local/0 rest of the disk
If you have any more disks, create 1 filesystem per disk, and arrange to
mount them as /local/1, /local/2, and so on.
The known space fillers can then be moved on to /local/{0,1,2,...} as
necessary, and then symlinked back in to place. For example;
mkdir -p /local/0/usr
mkdir -p /local/0/var
mkdir -p /local/0/home
cd /usr
mv src /local/0/usr
mv obj /local/0/usr
mv ports /local/0/usr
mv X11R6 /local/0/usr
ln -s /local/0/usr/* .
cd /var
mv mail /local/0/var
mv spool /local/0/var
ln -s /local/0/var/* .
and so on. Adjust the disks you move stuff to, depending on how many disks
you have, and expected usage.
For example, if you only have one disk, then /local/0/usr/{src,ports,obj}
and /local/0/home/ncvs[1] will all have to be on one disk.
When you add a second disk, you will definitely want to move
/local/0/usr/obj to /local/1/usr/obj, and /local/0/home/ncvs to
/local/1/home/ncvs (and update their symlinks). This is because:
1. If you do a CVS checkout from /home/ncvs to /usr/src, two different
disks will be used, speeding things up considerably.
2. If you do a "make world", the source will be read from /usr/src,
on the first disk, and the compiled programs (and object files)
will be written to /usr/obj, on the second disk, and again, this
will speed things up.
Problems with this approach
By placing everything on one (or a few) large filesystems, you lose
finegrained control.
For example, if /var/mail and /var/spool are symlinks to /local/0/var/mail
and /local/0/var/spool respectively, then there is the possibility that
large incoming e-mails can use up all the disk space, preventing anything
that requires /var/spool (such as lpd(8)) from working properly -- and vice
versa, as large print jobs may halt reception of incoming e-mail.
To an extent, you can work around this problem with quotas. For example,
the mail system runs as group 'mail', so you can set a group quota for mail
to prevent it filling up the disk. Some daemons also have configuration
options to prevent them filling up the disk, such as the lpd(8) minfree
file.
--
[1] Assuming you've got a local copy of the CVS tree you checkout /usr/src
from
--
Internet connection, $19.95 a month. Computer, $799.95. Modem, $149.95.
Telephone line, $24.95 a month. Software, free. USENET transmission,
hundreds if not thousands of dollars. Thinking before posting, priceless.
Somethings in life you can't buy. For everything else, there's MasterCard.
-- Graham Reed, in the Scary Devil Monastery
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message