I'm getting ready to set up a single system as a mail, print, web, and file
server. I may be installing other applications but nothing as intense as
Xorg. If at all, I'll probably just install some network monitoring tools.
I'm placing all of these roles on a single system because it is only for my
lab. I have a 160 GB to use and I'm thinking about laying out the partitions
as follows:
Part Size
/ 10G - for both the / and /usr files
(swap) 2G
/var 10G - Web server, print spool, other log files??
/var/mail 10G - for all mail files and easy backup
/home 50G - for all user files
/home/teo 40G - For my files and easy backup
*The rest of the space I'll leave unused in case I need to grow a partition
I'm new to FreeBSD/*Nix so all criticism is welcome.
Teo
FreeBSD is flexible enough to handle any directory
layout you like. No matter what background you
come from, you can always turn a few knobs -
and make yourself at home.
But if you want to stay with FreeBSD for some
time, if you want to know it better, it's best to
accept the installer's defaults - and get used
to them then. Minimum /, small /var and /tmp,
huge /usr - where all huge things are meant
to be, including web content, home dirs and
even huge logs and huge temporary files.
The talk is that hier and partitioning might
need some brushing up, but for now, if
you stick to it, you'll find it hard to run into
real trouble when you're left with no solution
other than repartitioning your whole disk.
Special partitioning is only really needed on production
servers, where you need all performance you can get.
Your box sounds like not a very critical one. I bet you'll
spend more time configuring it "to the max" than it'll
ever save you because of that.
Now, if you really think 20G is a proper size for web,
mail, spools and logs - just set your var to 20G. No
need to mess with any other stuff. That's my $.02.
Keep / small, around 200MB, and split user from this. You'll understand
why as soon as something nasty happens while you're writing to /usr and
the machine falls over. You can still boot because / is mainly static.
put 10-20 gigs in usr. When you build ports, they use space in /usr (by
default. You can change this) which is why I say 20 gigs.
256M in /tmp is fine
/var you want to be quite big if you're running a production server or a
mysql box, because db files and logs and mail etc. go to /var by
default. I find it easier to make /var big than create symlinks or
modify where things go.
Splitting /var and /var/mail is a good idea because if /var fills up
with logs then you'll still receive mail. For the same reason its a
good idea to make /var/db/mysql separate as well. The problem you run
into there is say you've put 10 gigs for each and you have 3 gigs of
logs, 5 gigs of mail and need 12 gigs for your database, then you loose
the flexibility.
I put my web pages in /usr/local/www/virtual/ so that comes under /usr.
You may want to put 90 gigs straight into /home and then setup quota's
so your users don't use up your disk space.
My 2 cents.
-John
--
John Oxley
Systems Administrator
Yo!Africa
E-Mail: john at yoafrica.com
Tel: +263 4 858404
echo '9k[l:l;s<s=0l>x]s"[1+l<dd*l=d*-l;+ds<rl=2**l:+ds=d*rd*+4<-d15>>] s>[q]s-[d77/3*2-s;47l"x-P1+d78>`]s`0[d23/.5-3*s:0l`xr10P1+d24>$]ds$x'|dc
mail, print, web, and file server
Part Size
/ 200M
/usr 15G - Ports live in usr
/tmp 256M
(swap) 2G - paging file
/var 10G - print spool, db files, other log files??
/var/mail 10G - for all mail files and easy backup
/www 5G - Web server - I'm going to have a lot of content
/home 50G - for all user files
*The rest of the space I'll leave unused in case I need to grow a partition
Firewall/Router
Part Size
/ 200M
/tmp 256M
/usr 7G
swap 512M
/var 2G
> E-Mail: john at yoafrica.com <http://yoafrica.com>
> Based on recommendations here is how I'm going to partition the two FreeBSD
> servers that I'm installing in my lab.
>
> mail, print, web, and file server
> Part Size
> / 200M
> /usr 15G - Ports live in usr
> /tmp 256M
> (swap) 2G - paging file
> /var 10G - print spool, db files, other log files??
> /var/mail 10G - for all mail files and easy backup
> /www 5G - Web server - I'm going to have a lot of content
> /home 50G - for all user files
> *The rest of the space I'll leave unused in case I need to grow a partition
>
> Firewall/Router
> Part Size
> / 200M
> /tmp 256M
> /usr 7G
> swap 512M
> /var 2G
>
<humbly_snipped>
I found this to be an interesting read on all FreeBSD boxes
man hier
--
Bill Schoolcraft
PO Box 210076
San Francisco, CA 94121
http://billschoolcraft.com
~
"You do best what you like most."
A very good suggestion, if you can spare a bit of memory (or swap) is to
use a memory-backed fs for /tmp (see the ``tmpmfs*'' options in rc.conf
manual page):
% man.rc.conf
Even a swap-backed /tmp may be a good idea, if you don't really want to
allocate a large root partition, just for the sake of /tmp files.
If all the fine advice above somehow leaves you wanting more:
#man tuning