From owner-freebsd-fs@FreeBSD.ORG Mon Jul 7 17:59:25 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B811106567B; Mon, 7 Jul 2008 17:59:25 +0000 (UTC) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (merlin.alerce.com [64.62.142.94]) by mx1.freebsd.org (Postfix) with ESMTP id 3FDCC8FC17; Mon, 7 Jul 2008 17:59:25 +0000 (UTC) (envelope-from hartzell@alerce.com) Received: from merlin.alerce.com (localhost [127.0.0.1]) by merlin.alerce.com (Postfix) with ESMTP id 7F03833C62; Mon, 7 Jul 2008 10:59:44 -0700 (PDT) Received: from postfix.alerce.com (w092.z064001164.sjc-ca.dsl.cnc.net [64.1.164.92]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by merlin.alerce.com (Postfix) with ESMTP id 4F01B33C5B; Mon, 7 Jul 2008 10:59:44 -0700 (PDT) Received: by postfix.alerce.com (Postfix, from userid 501) id 3E8934656E1; Mon, 7 Jul 2008 10:59:24 -0700 (PDT) From: George Hartzell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18546.22908.193997.709865@almost.alerce.com> Date: Mon, 7 Jul 2008 10:59:24 -0700 To: Kris Kennaway In-Reply-To: <4872566C.6000206@FreeBSD.org> References: <18546.20476.590665.29995@almost.alerce.com> <4872566C.6000206@FreeBSD.org> X-Mailer: VM 7.19 under Emacs 22.1.50.1 X-Virus-Scanned: ClamAV using ClamSMTP Cc: freebsd-fs@freebsd.org Subject: Re: using zfs and unionfs together, does zfs need to be extended? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hartzell@alerce.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 17:59:25 -0000 Kris Kennaway writes: > George Hartzell wrote: > > I'd like to be able to set up a large-ish number of very similar > > jails, with a minimum of fuss and take advantage of zfs' cool > > features. I'd like to use unionfs to do this, but zfs' lack of > > whiteout support seems to make it impossible. [jump to the bottom if > > you want to skip the setup and get to the questions] > > > > It seems like the most popular way to set up jails these days uses > > read-only nullfs mounts of a base system and symbolic links into a > > read-write nullfs mount for each jail's specific stuff (etc, > > /usr/local, etc...). > > The "ZFS way" is to just clone your jail filesystem into each jail instance. Both the nullfs approach used by ezjail and described in the handbook and the unionfs approach make updates *much* easier. A change/update to the jail base is automatically visible in all of the jails. As I understand a zfs clones (and a quick test backs this up), they're copies of the original filesystem, based on a snapshot. Once they're cloned they no longer "see" updates to the base system. I'm not even sure that you get the space savings, I just did a zfs snapshot and then a zfs clone and du -sH on the two filesystems reports the same size. That seems odd though (with all the copy on write stuff available), but.... g.