From owner-freebsd-stable@freebsd.org Wed May 18 23:42:02 2016 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5EBDB41CCD for ; Wed, 18 May 2016 23:42:02 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3709E1AD0 for ; Wed, 18 May 2016 23:42:01 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b3ArW-0002RK-Oi for freebsd-stable@freebsd.org; Thu, 19 May 2016 01:26:47 +0200 Received: from 216.9.107.180 ([216.9.107.180]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 May 2016 01:26:46 +0200 Received: from johannes by 216.9.107.180 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 19 May 2016 01:26:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Johannes Totz Subject: Re: State of unionfs? Date: Thu, 19 May 2016 00:26:39 +0100 Lines: 47 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 216.9.107.180 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 In-Reply-To: X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2016 23:42:02 -0000 On 18/05/2016 10:27, Patrick M. Hausen wrote: > Hi, all, > > we were looking for a way to get overlay/copy-on-write mounts for > ZFS datasets to ease jail management. > > Google turned up this old thread: > https://lists.freebsd.org/pipermail/freebsd-fs/2010-September/009221.html > > So, clearly in September 2010 mount_unionfs(8) was not supported > for ZFS datasets. > > A quick check on a current RELENG-10.3 system showed that this has > changed .Union-mounting one dataset on top of another does indeed > work at a superficial glance. > > Yet the manpage for mount_unionfs(8) still contains this disturbing > note: > > BUGS > THIS FILE SYSTEM TYPE IS NOT YET FULLY SUPPORTED (READ: IT DOESN'T WORK) > AND USING IT MAY, IN FACT, DESTROY DATA ON YOUR SYSTEM. USE AT YOUR OWN > RISK. BEWARE OF DOG. SLIPPERY WHEN WET. BATTERIES NOT INCLUDED. > > Is this still the case? Are there alternatives to our approach. > > What we would like to implement is e.g. a standard pre-populated /etc for each > jail with only modified files being written to a separate per-jail dataset. > Much like NanoBSD does when populating the /etc mfs at boot. > > While we can create a clone from a central snapshot for each jail, the > problem with this way is that we cannot exchange the base snapshot later, > e.g. after a major system update for the jail in question. Which is precisely > the intention in the first place ;-) > > Thanks for any hints > Patrick > I've used unionfs with zfs for a while now. Seems ok. But beware of nesting any mounts into either lower or upper layer. Files created in there may not appear in the right place. They used to, but that broke at some point. I'm now moving away from unionfs, and doing a simple zfs clone. When it's time to upgrade, copy data files separately. Config files are tracked with Mercurial.