From owner-freebsd-jail@FreeBSD.ORG Sat Jun 18 10:16:48 2011 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B05471065676 for ; Sat, 18 Jun 2011 10:16:48 +0000 (UTC) (envelope-from bubulein@freenas.org) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 45D0F8FC13 for ; Sat, 18 Jun 2011 10:16:48 +0000 (UTC) Received: by fxm11 with SMTP id 11so965576fxm.13 for ; Sat, 18 Jun 2011 03:16:47 -0700 (PDT) Received: by 10.223.76.212 with SMTP id d20mr3639853fak.5.1308392207268; Sat, 18 Jun 2011 03:16:47 -0700 (PDT) Received: from schlumpi.teufelchen.tld (pD9FD105A.dip.t-dialin.net [217.253.16.90]) by mx.google.com with ESMTPS id h1sm1744252fag.35.2011.06.18.03.16.45 (version=SSLv3 cipher=OTHER); Sat, 18 Jun 2011 03:16:46 -0700 (PDT) Message-ID: <4DFC7B0C.6040205@freenas.org> Date: Sat, 18 Jun 2011 10:16:44 +0000 From: Christian Degen User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-jail@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Exposing a hierarchy of ZFS datasets inside multiple jails X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jun 2011 10:16:48 -0000 Moin, I assume the easiest solution would be to make the many mountpoints (datasets) invisiable for NFS. Here we go. teufelchen# /etc/rc.d/jail stop alcatraz ## This will be the dataset which contains home's for example teufelchen# zfs create tank/nullfs ## Now I create a dir which will be shared to the jails ## My idea is to make the mountpoints invisiable for NFS teufelchen# mkdir /mnt/tank/nfs_home teufelchen# mount_nullfs /mnt/tank/nullfs/ /mnt/tank/nfs_home/ teufelchen# mkdir /mnt/tank/alcatraz/mnt/nfs_home teufelchen# cat /mnt/tank/freebsd/fstab.alcatraz 192.168.1.10:/mnt/tank/nfs_home /mnt/tank/alcatraz/mnt/nfs_home nfs rw 0 0 teufelchen# /etc/rc.d/jail start alcatraz ### IIRC ### You like to create datasets on the host, which apear in the jails just in ### time? teufelchen# zfs create tank/nullfs/dataset1 teufelchen# touch /mnt/tank/nfs_home/dataset1/newfile teufelchen# jexec 14 ls /mnt/nfs_home/dataset1/ newfile Is this what you are trying todo? Christian Degen