[geeks] BSD Questions

Jonathan Patschke jp at celestrion.net
Mon Feb 14 19:30:51 CST 2011


On Mon, 14 Feb 2011, Mike Meredith wrote:

> How stable is FreeBSD 8 with ZFS[1] likely to be ? Not that I imagine
> *BSD has grown any less stable over the years, but ZFS is a little new.

First, a brag on my tough little FreeBSD 6.x audio-streaming/podcasting
box:
   $ uptime
    7:20PM  up 1400 days, 15:45, 1 user, load averages: 0.08, 0.02, 0.01

There are some caveats, but I've found FreeBSD 8.1 with ZFS to be
perfectly stable.  I use it at home, and $ork uses it in production.

The biggest caveat is that the installer does not support installing to
ZFS; you have to perform the installation manually.  It's not difficult,
but it is a rather horrid first introduction to the operating system.  I'd
hoped to find time to hack ZFS support into the installer, but $ork has
been eating all my time for the past few months.

To do a ZFS-root install by hand, grab the 'DVD 1' image of 8.1 or 8.2-RC3
and follow these instructions:
   http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot

That how-to goes a little crazy with ZFS options in /var.  There's nothing
in there that I'd strictly recommend against, but nobody's going to give
you a lot of guff for making /var a single filesystem with the default
options.

A second caveat is that you really want to run FreeBSD/amd64 (not i386)
for ZFS.  FreeBSD's facilities for running i386 binaries on an amd64
kernel aren't really up to par with Solaris or OS X, but they're mostly
usable.

> Given that FreeBSD-CURRENT has a later version of ZFS with features I'd
> like, how stable is that likely to be ?
>
> I'm not looking for stable enough to keep a bank happy, but neither do I
> want to come home several times a week to find a kernel panic on the
> console.

The handbook's official stance is here
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html

To put it a different way, here are this month's commit logs:
   http://lists.freebsd.org/pipermail/svn-src-head/2011-February/thread.html

If you'd snagged -CURRENT some time this month, that means that you are
running the operating system at any one of those commit points.  I
wouldn't want to rely on something that fluid.  No one can guarantee how
stable a system will or won't be running -CURRENT.

Tracking -STABLE is usually pretty safe, but 8.2 is going to be out in a
matter of days, which has ZFS pool version 15 and FS version 4.  Is that
new enough for your needs?

> Anything about the spec of that HP that screams "not for FreeBSD" ?

Nope, FreeBSD sounds like an excellent choice for that system.

> Slightly more technical now, given that BSD Jails basically require a
> complete copy of the 'world' does it seem feasible to do that by
> providing a Jail with a ZFS clone of the 'global jail' ?

Yes, you can do exactly that to save a ton[0] of disk space.  However,
should you need to upgrade the world on one of the jails, bear in mind
that you'll need to back up your per-jail changes separately (not just a
ZFS snapshot), since there's no way to update the basis for a clone and
then reapply snapshotted changes.

> And anything else that seems worth mentioning!

Avoid putting swap on ZFS.  You already need a separate GPT slice for your
boot volume; create a second one for swap.  If you want, you can mirror
swap with GEOM, but swap on ZFS is bad for two reasons.
         1) You lose savecore
         2) If you're in a very low-memory situation and ZFS needs to
            claim a few more blocks for swap, that occasionally requires a
            memory allocation--things go downhill from there.


[0] Benefit increases with the number of jails, obviously.
[1] NMF
-- 
Jonathan Patschke  |
Elgin, TX          |  Sent from your rooted trendy mobile device.
USA                |


More information about the geeks mailing list