Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Aliya Harbouri
Hi!

I'm setting up a jailed server. I'm hoping to eventually use
sysutils/ezjail to deaden the pain a bit!

First step, have to get the disks partitioned! They're unpacked, at least ;-)

I've read lots of comments like,

  You should never setup your FreeBSD systems the way Linux or other
*nix's set them up.

So, I'm looking for some Wisdom on how best to partition for the usage
I'm planning.

The server's goal state is 4 jails, plus the non-jailed host:

jail-1: DNS services {Bind9  RBLDNSD}
jail-2: WebServer{Apache 22x + PHP5 + Perl 588 + MySQL 50x}
jail-3: mail server  {Exim 468 + Spamassassin + ClamAV, etc.}
jail-4: an analysis/monitoring toolkit {Snort, Nagios, Nessus, etc.}

I've got two identical 250 GB SATA2 drives available for this box.

Although I have not yet grokked the whole What's in a jail's dirs?
issue, my initial stab at 'slices' is ~:

drive 2:
/   2GB
/boot   2GB
/tmp2GB
/swap   16GBMachine has 8GB RAM, so swap = 2X RAM
/usr50GB
/jails  178GB

drive 2:
/var100GB
/data   100GB   MailStore, DBs, www source files, etc.
/home   20GB

I'll betcha some of that's silly or wasteful.

Any insighful comments or better advice on this ^^ would make me a happy gal :-)

Thanks a lot!

Ali
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Federico Lorenzi
On 9/26/07, Aliya Harbouri [EMAIL PROTECTED] wrote:
 Hi!

 I'm setting up a jailed server. I'm hoping to eventually use
 sysutils/ezjail to deaden the pain a bit!
I gave that a shot once, but I found manual jail configuration to be better.

 First step, have to get the disks partitioned! They're unpacked, at least ;-)

 I've read lots of comments like,

   You should never setup your FreeBSD systems the way Linux or other
 *nix's set them up.
You shouldn't ^-^


 So, I'm looking for some Wisdom on how best to partition for the usage
 I'm planning.

 The server's goal state is 4 jails, plus the non-jailed host:

 jail-1: DNS services {Bind9  RBLDNSD}
 jail-2: WebServer{Apache 22x + PHP5 + Perl 588 + MySQL 50x}
 jail-3: mail server  {Exim 468 + Spamassassin + ClamAV, etc.}
 jail-4: an analysis/monitoring toolkit {Snort, Nagios, Nessus, etc.}

 I've got two identical 250 GB SATA2 drives available for this box.

 Although I have not yet grokked the whole What's in a jail's dirs?
 issue, my initial stab at 'slices' is ~:

 drive 2:
 /   2GB
A bit big, but fine
 /boot   2GB
Nope, FreeBSD doesn't need / want a /boot
 /tmp2GB
Fine
 /swap   16GBMachine has 8GB RAM, so swap = 2X RAM
A bit of overkill, but what the hell, you have the space
 /usr50GB
What exactly do you plan on running on the host?
 /jails  178GB
Fine...


 drive 2:
 /var100GB
Huh? Refer to /usr above.
 /data   100GB   MailStore, DBs, www source files, etc.
Fine again...
 /home   20GB
Fine again..


 I'll betcha some of that's silly or wasteful.
You'd be correct there :)

I'm sure you could fit everything on one disk... Jails are really small, it's
just your data that takes up space. If you could get everything in 250GB
(which i think you could easily) RAID 1 might be a nice thing to have

HTH

Federico
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Jonathan Horne
On Wednesday 26 September 2007 15:33:12 Federico Lorenzi wrote:
 On 9/26/07, Aliya Harbouri [EMAIL PROTECTED] wrote:
  Hi!
 
  I'm setting up a jailed server. I'm hoping to eventually use
  sysutils/ezjail to deaden the pain a bit!

 I gave that a shot once, but I found manual jail configuration to be
 better.

  First step, have to get the disks partitioned! They're unpacked, at least
  ;-)
 
  I've read lots of comments like,
 
You should never setup your FreeBSD systems the way Linux or other
  *nix's set them up.

 You shouldn't ^-^

  So, I'm looking for some Wisdom on how best to partition for the usage
  I'm planning.
 
  The server's goal state is 4 jails, plus the non-jailed host:
 
  jail-1: DNS services {Bind9  RBLDNSD}
  jail-2: WebServer{Apache 22x + PHP5 + Perl 588 + MySQL 50x}
  jail-3: mail server  {Exim 468 + Spamassassin + ClamAV, etc.}
  jail-4: an analysis/monitoring toolkit {Snort, Nagios, Nessus, etc.}
 
  I've got two identical 250 GB SATA2 drives available for this box.
 
  Although I have not yet grokked the whole What's in a jail's dirs?
  issue, my initial stab at 'slices' is ~:
 
  drive 2:
  /   2GB

 A bit big, but fine

  /boot   2GB

 Nope, FreeBSD doesn't need / want a /boot

  /tmp2GB

 Fine

  /swap   16GBMachine has 8GB RAM, so swap = 2X RAM

 A bit of overkill, but what the hell, you have the space

  /usr50GB

 What exactly do you plan on running on the host?

  /jails  178GB

 Fine...

  drive 2:
  /var100GB

 Huh? Refer to /usr above.

  /data   100GB   MailStore, DBs, www source files, etc.

 Fine again...

  /home   20GB

 Fine again..

  I'll betcha some of that's silly or wasteful.

 You'd be correct there :)

 I'm sure you could fit everything on one disk... Jails are really small,
 it's just your data that takes up space. If you could get everything in
 250GB (which i think you could easily) RAID 1 might be a nice thing to have

 HTH

 Federico
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]

youll do just as fine to hit 'A-S-Q during the partitioning portion, and 
taking the defaults.  FreeBSD installer will take the best options, and put 
all the remaining space as /usr.

i just put my jails under /usr/jails.

keep the host as simple as possible, as building multiple jails will just 
multiply your complexity quickly enough.

i would also agree with Frederico... do a RAID1 with your (2) 250GB drives.

cheers,

-- 
Jonathan Horne
http://dfwlpiki.dfwlp.org
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Aliya Harbouri
  drive 2:
  /   2GB
 A bit big, but fine

I though so, but with drives this big  cheap ... :-)

  /boot   2GB
 Nope, FreeBSD doesn't need / want a /boot

I didn't realize :-/

Just to be sure, you DO mean it doesn't want a separate
slice/partition, right?  Because, I'm looking at a /boot directory
...

  /tmp2GB
 Fine

OK.

  /swap   16GBMachine has 8GB RAM, so swap = 2X RAM
 A bit of overkill, but what the hell, you have the space

I've had 2X RAM drummed into me for ages. Not the way of things in FreeBSD?

  /usr50GB
 What exactly do you plan on running on the host?

Normally, not a whole lot.  I'll have a full Development environment
there, of course. cron, sshd, snmpd (haven't figured out yet if I need
that in EACH jail yet), etc -- small stuff mainly.  Eventually some
VPN service via an an encryption card, but that's later.

If I'm forced to do so, maybe KDE4 for rare/occassional use.  Prefer not to ...

  /jails  178GB
 Fine...


  drive 2:
  /var100GB
 Huh? Refer to /usr above.

My guess @ /var sizing came as a result of,

http://barryp.org/blog/entries/ezjail_ports/

To keep both jailed and non-jailed systems from trying to put any
port-building working-directories or downloaded distribution files in
/usr/ports, the /etc/make.conf files (both the real one and the ones
inside jails) should contain something like:

WRKDIRPREFIX=   /var/ports
DISTDIR=/var/ports/distfiles
PACKAGES=   /var/ports/packages

And having multiple ports copies ... But, now, as I'm re-reading that,
I think I got it backwards.  This'll PREVENT having multiple, wasteful
copies.

I think.

  /data   100GB   MailStore, DBs, www source files, etc.
 Fine again...
  /home   20GB
 Fine again..

 
  I'll betcha some of that's silly or wasteful.
 You'd be correct there :)

Give a girl a break! I must've missed the really-easy-and-clear
documentation on the whole thing!

At least I asked first ;-p

 I'm sure you could fit everything on one disk... Jails are really small, it's
 just your data that takes up space. If you could get everything in 250GB
 (which i think you could easily) RAID 1 might be a nice thing to have

Now that's an interesting thought.  My Mobo has 1 SATA-2 port (3
devices), and 2 SATA-1 ports (1 device each).  And it does support
SATA RAID 0/1.

I'm NOT AT ALL sure what running RAID on 2 drives on a single SATA-2
port does for performance, but it IS an interesting option. Tanks!

 HTH

It does :-)

Thanks a lot!

Ali
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Mel
On Wednesday 26 September 2007 22:20:11 Aliya Harbouri wrote:
 Hi!

 I'm setting up a jailed server. I'm hoping to eventually use
 sysutils/ezjail to deaden the pain a bit!

 First step, have to get the disks partitioned! They're unpacked, at least
 ;-)

 I've read lots of comments like,

   You should never setup your FreeBSD systems the way Linux or other
 *nix's set them up.

 So, I'm looking for some Wisdom on how best to partition for the usage
 I'm planning.

 The server's goal state is 4 jails, plus the non-jailed host:

 jail-1: DNS services {Bind9  RBLDNSD}
 jail-2: WebServer{Apache 22x + PHP5 + Perl 588 + MySQL 50x}
 jail-3: mail server  {Exim 468 + Spamassassin + ClamAV, etc.}
 jail-4: an analysis/monitoring toolkit {Snort, Nagios, Nessus, etc.}

 I've got two identical 250 GB SATA2 drives available for this box.

 Although I have not yet grokked the whole What's in a jail's dirs?
 issue, my initial stab at 'slices' is ~:

   drive 2:
   /   2GB
   /boot   2GB

/boot *needs* to be on /. A loader looks for [bootdisk][bootslice]
[a]/boot/loader.

   /tmp2GB
   /swap   16GBMachine has 8GB RAM, so swap = 2X RAM

Since you have 2 physical drives, you may want to do 8G on each drive. In the 
rare case it's needed, your system is in trouble and being able to swap on 
using 2 drives will be a plus.

   /usr50GB
   /jails  178GB

   drive 2:
   /var100GB
   /data   100GB   MailStore, DBs, www source files, etc.

Unless you're a packrat where logs are concerned, you can probably do with:
/var 10G (on disk 1)
And use:
/var/db 100G - this will house MySQL primarily
/var/spool 10-50G - any queues, most notably mail, disable softupdates. Adjust 
size to match your mail payload.
/var/mail - rest - possibly disable softupdates.

Allthough, I think MySQL will generally use less space then a mail storage, 
but this all depends on your users.

   /home   20GB

By default, the WWW root on bsd for apache is /usr/local/www and generally on 
servers like this, home can be done with 2G or less. *Unless* you plan on 
providing /~username/ service, then home might be on the light side.

I'm generally a fan of separating trees that can grow out of proportion over 
time, so that you can dump(8) the partition and restore(8) it on a new drive 
without too much worry. Your mileage may vary.

Also have a look at hier(7) manpage, it's quite informative about the default 
filesystem layout BSD uses.
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Federico Lorenzi
On 9/26/07, Mel [EMAIL PROTECTED] wrote:
 On Wednesday 26 September 2007 22:20:11 Aliya Harbouri wrote:
  Hi!
 
  I'm setting up a jailed server. I'm hoping to eventually use
  sysutils/ezjail to deaden the pain a bit!
 
  First step, have to get the disks partitioned! They're unpacked, at least
  ;-)
 
  I've read lots of comments like,
 
You should never setup your FreeBSD systems the way Linux or other
  *nix's set them up.
 
  So, I'm looking for some Wisdom on how best to partition for the usage
  I'm planning.
 
  The server's goal state is 4 jails, plus the non-jailed host:
 
  jail-1: DNS services {Bind9  RBLDNSD}
  jail-2: WebServer{Apache 22x + PHP5 + Perl 588 + MySQL 50x}
  jail-3: mail server  {Exim 468 + Spamassassin + ClamAV, etc.}
  jail-4: an analysis/monitoring toolkit {Snort, Nagios, Nessus, etc.}
 
  I've got two identical 250 GB SATA2 drives available for this box.
 
  Although I have not yet grokked the whole What's in a jail's dirs?
  issue, my initial stab at 'slices' is ~:
 
drive 2:
/   2GB
/boot   2GB

 /boot *needs* to be on /. A loader looks for [bootdisk][bootslice]
 [a]/boot/loader.

/tmp2GB
/swap   16GBMachine has 8GB RAM, so swap = 2X RAM

 Since you have 2 physical drives, you may want to do 8G on each drive. In the
 rare case it's needed, your system is in trouble and being able to swap on
 using 2 drives will be a plus.

/usr50GB
/jails  178GB
 
drive 2:
/var100GB
/data   100GB   MailStore, DBs, www source files, etc.

 Unless you're a packrat where logs are concerned, you can probably do with:
 /var 10G (on disk 1)
 And use:
 /var/db 100G - this will house MySQL primarily
 /var/spool 10-50G - any queues, most notably mail, disable softupdates. Adjust
 size to match your mail payload.
 /var/mail - rest - possibly disable softupdates.

 Allthough, I think MySQL will generally use less space then a mail storage,
 but this all depends on your users.

/home   20GB

 By default, the WWW root on bsd for apache is /usr/local/www and generally on
 servers like this, home can be done with 2G or less. *Unless* you plan on
 providing /~username/ service, then home might be on the light side.

 I'm generally a fan of separating trees that can grow out of proportion over
 time, so that you can dump(8) the partition and restore(8) it on a new drive
 without too much worry. Your mileage may vary.

 Also have a look at hier(7) manpage, it's quite informative about the default
 filesystem layout BSD uses.
 --

Um, from what I've understood, it's going to be a jail server, those
defaults would
be all well and good for a normal server, but in this case we want a big
/data. and moderate /jails.

Here are my recommendations:
/
- Small, painfully so. 512MB

/var
- Nothing should really go in here if you are using Jails. Including
EZjail, that should
be somewhere under /usr... 2GB

/tmp
- Not to big really, remember everything goes in a Jail... 2GB
-- Symlink /var/tmp to here

/usr
- Again, and now i sound like a broken record. However, since ports
can get quite
big be a little more generous... 15GB

/jails
- Doesn't really need to be too big, the max I say one jail could
reach is 10GB without
data, which falls under /data... 50GB

/home
- Should be medium sized... 20GB

/data
- I have no clue what your requirements will be, so 100GB should
cover everything
a few times over... Rest of disk... ~170GB

This should be just fine, and you can have your disks in RAID 1.
As for performance, RAID 1 doubles read speed.

Cheers
Federico

PS) I take you know how to use NullFS and the like?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Jerry McAllister
On Wed, Sep 26, 2007 at 02:02:09PM -0700, Aliya Harbouri wrote:

   drive 2:
   /   2GB
  A bit big, but fine
 
 I though so, but with drives this big  cheap ... :-)
 
   /boot   2GB
  Nope, FreeBSD doesn't need / want a /boot
 
 I didn't realize :-/
 
 Just to be sure, you DO mean it doesn't want a separate
 slice/partition, right?  Because, I'm looking at a /boot directory

Yes, you should not put /boot in a separate filesystem.
It should be in root.

You have a lot for stuff like /usr, but really, how much you need
in any file system depends on how you will use it.   Try it and
gain some experience with the setup and go from there.   You can
change it the next time you do a major upgrade.   

jerry

 ...
 
   /tmp2GB
  Fine
 
 OK.
 
   /swap   16GBMachine has 8GB RAM, so swap = 2X RAM
  A bit of overkill, but what the hell, you have the space
 
 I've had 2X RAM drummed into me for ages. Not the way of things in FreeBSD?
 
   /usr50GB
  What exactly do you plan on running on the host?
 
 Normally, not a whole lot.  I'll have a full Development environment
 there, of course. cron, sshd, snmpd (haven't figured out yet if I need
 that in EACH jail yet), etc -- small stuff mainly.  Eventually some
 VPN service via an an encryption card, but that's later.
 
 If I'm forced to do so, maybe KDE4 for rare/occassional use.  Prefer not to 
 ...
 
   /jails  178GB
  Fine...
 
 
   drive 2:
   /var100GB
  Huh? Refer to /usr above.
 
 My guess @ /var sizing came as a result of,
 
 http://barryp.org/blog/entries/ezjail_ports/
 
 To keep both jailed and non-jailed systems from trying to put any
 port-building working-directories or downloaded distribution files in
 /usr/ports, the /etc/make.conf files (both the real one and the ones
 inside jails) should contain something like:
 
 WRKDIRPREFIX=   /var/ports
 DISTDIR=/var/ports/distfiles
 PACKAGES=   /var/ports/packages
 
 And having multiple ports copies ... But, now, as I'm re-reading that,
 I think I got it backwards.  This'll PREVENT having multiple, wasteful
 copies.
 
 I think.
 
   /data   100GB   MailStore, DBs, www source files, etc.
  Fine again...
   /home   20GB
  Fine again..
 
  
   I'll betcha some of that's silly or wasteful.
  You'd be correct there :)
 
 Give a girl a break! I must've missed the really-easy-and-clear
 documentation on the whole thing!
 
 At least I asked first ;-p
 
  I'm sure you could fit everything on one disk... Jails are really small, 
  it's
  just your data that takes up space. If you could get everything in 250GB
  (which i think you could easily) RAID 1 might be a nice thing to have
 
 Now that's an interesting thought.  My Mobo has 1 SATA-2 port (3
 devices), and 2 SATA-1 ports (1 device each).  And it does support
 SATA RAID 0/1.
 
 I'm NOT AT ALL sure what running RAID on 2 drives on a single SATA-2
 port does for performance, but it IS an interesting option. Tanks!
 
  HTH
 
 It does :-)
 
 Thanks a lot!
 
 Ali
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Aliya Harbouri
Hi guys!

Some great ideas  advice. Thanks a lot :-)

  /boot *needs* to be on /. A loader looks for [bootdisk][bootslice]
  [a]/boot/loader.

Ok, gotcha.

  Since you have 2 physical drives, you may want to do 8G on each drive. In 
  the
  rare case it's needed, your system is in trouble and being able to swap on
  using 2 drives will be a plus.

Sigh.

I did not know I COULD split swap.  Hum.  How does the system
use/allocate each across the split ... Ok, ok. That's what Googling's
for :-)

  Unless you're a packrat where logs are concerned,


I'm not, really.  I probably SHOULD be.

 you can probably do with:
  /var 10G (on disk 1)
  And use:
  /var/db 100G - this will house MySQL primarily
  /var/spool 10-50G - any queues, most notably mail, disable softupdates. 
  Adjust
  size to match your mail payload.
  /var/mail - rest - possibly disable softupdates.

Good thoughts. Need to better understand why I care about softupdates
one way or the other, though.


  I'm generally a fan of separating trees that can grow out of proportion over
  time, so that you can dump(8) the partition and restore(8) it on a new drive
  without too much worry. Your mileage may vary.

Sounds like good advice.

  Also have a look at hier(7) manpage, it's quite informative about the 
  default
  filesystem layout BSD uses.

Missed that. :-(  Very useful, though!

 Um, from what I've understood, it's going to be a jail server, those
 defaults would
 be all well and good for a normal server, but in this case we want a big
 /data. and moderate /jails.

 Here are my recommendations:
[]

This all sounds good.

 This should be just fine, and you can have your disks in RAID 1.
 As for performance, RAID 1 doubles read speed.

I nvere really thought of RAID 1 as a performance improvement, R or W,
but more fault-tolerance.  I should read up some more.

 PS) I take you know how to use NullFS and the like?

I'm currenly at can.  Working on getting to know;-)

Thanks all!

Ali
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Any advice for a Partition Plan for a multi-jailed Server?

2007-09-26 Thread Mel
On Wednesday 26 September 2007 23:40:26 Aliya Harbouri wrote:

 I did not know I COULD split swap.  Hum.  How does the system
 use/allocate each across the split ... Ok, ok. That's what Googling's
 for :-)

Actually, swapon(8) tells a lot ;)


   Unless you're a packrat where logs are concerned,

 I'm not, really.  I probably SHOULD be.

  you can probably do with:
   /var 10G (on disk 1)
   And use:
   /var/db 100G - this will house MySQL primarily
   /var/spool 10-50G - any queues, most notably mail, disable softupdates.
   Adjust size to match your mail payload.
   /var/mail - rest - possibly disable softupdates.

 Good thoughts. Need to better understand why I care about softupdates
 one way or the other, though.

Generally, a mailserver doesn't benefit from softupdates, because it will wait 
for committed to disk signal from OS, to prevent mail from being lost. Over 
time you will also get a good idea of what kind of mail you're dealing with 
and tunefs(8) might be beneficial. It's one major reason I dislike /data 
mountpoints containing all different kinds of services. Over time budget and 
usage have a way of conflicting and you'll be happy to get any extra 
performance outof your machines.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]