From owner-freebsd-fs@FreeBSD.ORG Thu Sep 2 22:14:11 2010 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 3311D1065805 for ; Thu, 2 Sep 2010 22:14:11 +0000 (UTC) (envelope-from phillip.nordwall@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id DE26C8FC17 for ; Thu, 2 Sep 2010 22:14:10 +0000 (UTC) Received: by qwg5 with SMTP id 5so1133029qwg.13 for ; Thu, 02 Sep 2010 15:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=z9cnxbJ/Q6oMlc9TDb//iYOfWBo1T/6reJ4iPXg4fgc=; b=Gl0zKolDGbpfGk7nG0lG/JqU0sDIaVhVNQDBFRfsb+ggdAIV/A2D8TXdOhQl2eBHPJ Z9r0CydP1KgOXePMBe8te9+cCy3vso4CSOEirJE4wTFJDKfzA0AO8GKESXMk+u/sSbHE v+oQ9Dc8tX5qWzNhESobsea+gX8BZQq5yo7Sk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=aVFraiqnS/YgHyKP6LfdRulOGVPFGpxh6aDCMMo+fxa6xbCIXh77lCNpsI3/5fuhle WINq6Yymh52UiOJeVuBu52jbCMFJnCA99Ssv1atBidrE8IL/EatLxPODwU9dWSzUxZOj qdCBPMrK9ucUYcj8uTFSrNWlPRvTZ5Din7L80= MIME-Version: 1.0 Received: by 10.224.29.4 with SMTP id o4mr853953qac.203.1283463927234; Thu, 02 Sep 2010 14:45:27 -0700 (PDT) Received: by 10.224.47.144 with HTTP; Thu, 2 Sep 2010 14:45:27 -0700 (PDT) Date: Thu, 2 Sep 2010 14:45:27 -0700 Message-ID: From: Phillip Nordwall To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ZFS mount_unionfs or ZFS overlay X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Sep 2010 22:14:11 -0000 I'm trying to do a mount_unionfs of a zfs file system over another filesystem and am getting an Operation not supported. If I try to do a zfs mount -O (for an overlay) I get the following error: no overlay mounts support on FreeBSD, ignoring. I'm thinking about digging into the code (guided by The Design and Implementation of the FreeBSD Operating Sytem) to find out how to make zfs union mounts work, but I figured I should ask here if there is a good reason why it is not currently implemented. My goal is to have the following mount setup. tank0/base on /zmnts/base (zfs, local) tank0/www on /zmnts/www (zfs, local) tank0/web0 on /zmnts/web0 (zfs, local) tank0/web1 on /zmnts/web1 (zfs, local) . . . tank0/webn on /zmnts/webn (zfs, local) /zmnts/base on /jails/base (nullfs, local) /jails/base on /jails/www (nullfs, local, read-only) :/zmnts/www on /jails/www (unionfs, local) /jails/www on /jails/web0 (nullfs, local, read-only) :/zmnts/web0 on /jails/web0 (unionfs, local) /jails/www on /jails/web1 (nullfs, local, read-only) :/zmnts/web1 on /jails/web1 (unionfs, local) . . . /jails/www on /jails/webn (nullfs, local, read-only) :/zmnts/webn on /jails/webn (unionfs, local) This would allow me to have a hierarchy of "inherited" jails where I could update any level and the levels below it would be updated, but also allow each level to override any or all files from a higher level. It also would allow for snapshotting any level, cloning it, performing a union mount below another level followed by the unmounting of a level it is now over. This gives much more power than just using a single nullfs layer. If you have any reason why I shouldn't do this, please let me know. Philip Nordwall Senior Systems Analyst/Programmer Computer Science Department Western Washington University On Thu, Sep 2, 2010 at 2:04 AM, Pawel Jakub Dawidek wrote: > On Thu, Sep 02, 2010 at 01:55:51AM -0700, Rob Farmer wrote: > > On Tue, Aug 31, 2010 at 2:59 PM, Pawel Jakub Dawidek > wrote: > > > > > > Ok, now that I know you read everything carefully, here is the patch: > > > > > > http://people.freebsd.org/~pjd/patches/zfs_20100831.patch.bz2 > > > > > > > buildworld on i386 (yes I know ZFS isn't ideal there): > [...] > > Yes, I know about this problem, You can use attached patch or wait for > full patch, which I'll be sending later today. > > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! >