Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Recommended partitioning

11 views
Skip to first unread message

Teo De Las Heras

unread,
Oct 15, 2005, 5:01:01 PM10/15/05
to freebsd-...@freebsd.org
---------- Forwarded message ----------
From: Teo De Las Heras <teoh...@gmail.com>
Date: Oct 15, 2005 4:11 PM
Subject: Feeback on partitioning
To: freebsd-...@freebsd.org

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

Andrew P.

unread,
Oct 15, 2005, 9:51:09 PM10/15/05
to Teo De Las Heras, freebsd-...@freebsd.org
> _______________________________________________
> freebsd-...@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questi...@freebsd.org"
>
>

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.

Teo De Las Heras

unread,
Oct 15, 2005, 10:07:33 PM10/15/05
to Andrew P., freebsd-...@freebsd.org
Some of my reading in books and online does suggest straying from the
default when configuring mail and web servers (for example). I do understand
the importance of following standards, and that's why I'm asking for
feedback from this list.
Teo

Andrew P.

unread,
Oct 16, 2005, 4:41:40 AM10/16/05
to Teo De Las Heras, freebsd-...@freebsd.org
On 10/16/05, Teo De Las Heras <teoh...@gmail.com> wrote:
>
> Some of my reading in books and online does suggest straying from the
> default when configuring mail and web servers (for example). I do
> understand the importance of following standards, and that's why I'm asking
> for feedback from this list.
>
> Teo
>

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.

John Oxley

unread,
Oct 16, 2005, 8:50:50 AM10/16/05
to Teo De Las Heras, freebsd-...@freebsd.org
On Sat, Oct 15, 2005 at 05:01:01PM -0400, Teo De Las Heras wrote:
> 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

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

Teo De Las Heras

unread,
Oct 16, 2005, 11:28:50 AM10/16/05
to John Oxley, freebsd-...@freebsd.org
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

> E-Mail: john at yoafrica.com <http://yoafrica.com>

Bill Schoolcraft

unread,
Oct 16, 2005, 12:31:09 PM10/16/05
to Teo De Las Heras, freebsd-...@freebsd.org, John Oxley
At Sun, 16 Oct 2005 it looks like Teo De Las Heras composed:

> 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."

Giorgos Keramidas

unread,
Oct 16, 2005, 11:45:12 PM10/16/05
to John Oxley, Teo De Las Heras, freebsd-...@freebsd.org
On 2005-10-16 14:50, John Oxley <jo...@yoafrica.com> wrote:
> On Sat, Oct 15, 2005 at 05:01:01PM -0400, Teo De Las Heras wrote:
> > 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.
>
> 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

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.

Peter Clutton

unread,
Oct 18, 2005, 7:12:00 AM10/18/05
to Teo De Las Heras, freebsd-...@freebsd.org
On 10/16/05, Teo De Las Heras <teoh...@gmail.com> wrote:
> 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:

If all the fine advice above somehow leaves you wanting more:

#man tuning

0 new messages