|
Author: tld
Date: 25-08-08 12:49
Hi,
ezjail isn't the fun way to play with jails. ZFS is.
First of all, the /etc/rc.d/jail script has been quite updated, and will take care of the day-to-day stuff, such as starting and stopping jails.
Simply define:
jail_enable="YES"
jail_list="psql"
jail_psql_rootdir="/usr/local/jails/psql.freebsddiary.org"
jail_psql_hostname="psql.freebsddiary.org"
jail_psql_ip="10.10.10.10"
jail_psql_devfs_enable="YES"
jail_psql_devfs_ruleset="devfsrules_jail" # devfs ruleset to apply to jail
And you can do:
/etc/rc.d/jail start psql
That's it. No need for a port to retrofit this.
Also, for the fun part. If you throw in ZFS in the loop, you get better control over disk usage (pr. jail or even pr. dir quotas, compression, redundancy-levels etc).
You can also snapshot jails.
That's right. If you're going to upgrade a jailed "machine", just snapshot it, test it, and roll back if there's a problem. If you have read-write userdata, simply put it in a separate zfs, and you can do it with parts of the "virtual machine".
But wait! There's more!
If you can create a base config, with most of the things you'll typically need for a jail, you can then snapshot and clone it.
If you have a base jail, and you'd like to install a 4MB package in addition to your standard stuff, the entire jail will only take up that 4MB of space.
You save RAM too. I think. Not entirely sure how ZFS fits into the FreeBSD page system, but since you're running your libc and whatnot from the same disk pages for all your jails, I'd think it's quite likely you'll save up some RAM too.
Sounds like a good plan?
|
|
Reply To This Message
|
|
Author: Dan
Date: 25-08-08 13:44
tld wrote:
> Sounds like a good plan?
All except: ZFS isn't quite ready for production, from everything I've heard.
--
Webmaster
|
|
Reply To This Message
|
|
Author: tld
Date: 26-08-08 08:50
Details, details. ;)
ZFS is "different" for a lot of FreeBSD people. We're used to anything in FreeBSD being stable on anything it can run on. ZFS seems to have issues on low memory i386 machines, but work quite well on amd64 machines with 4GB+.
In other words, I guess it all depends on your needs. ZFS also offers a lot of convenient features which are tempting to have in production, such as protection against silent datacorruption (seen that a couple of times too many), being able to use all the space effectively without downtime for reinstall, etc etc.
Might not want to dive in and convert anythign and everything to run ZFS, but it's definitively ready for testing out.
|
|
Reply To This Message
|
|