From owner-freebsd-jail@freebsd.org Fri Dec 9 11:11:58 2016 Return-Path: Delivered-To: freebsd-jail@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 CC0B3C5CC0F for ; Fri, 9 Dec 2016 11:11:58 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F9A31F6C for ; Fri, 9 Dec 2016 11:11:57 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id E56A528475; Fri, 9 Dec 2016 12:11:54 +0100 (CET) Received: from illbsd.quip.test (ip-86-49-16-209.net.upcbroadband.cz [86.49.16.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 252592847F; Fri, 9 Dec 2016 12:11:54 +0100 (CET) Subject: Re: ZFS and Jail :: nullfs mount :: nothing visible from host To: SK , freebsd-jail References: <584986D0.3040109@quip.cz> <2b6346f8-ed02-0e6d-bd89-106098e7eb2d@cps-intl.org> <58499446.3050403@quip.cz> <5849C5BF.7020005@quip.cz> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <584A9179.9060508@quip.cz> Date: Fri, 9 Dec 2016 12:11:53 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2016 11:11:58 -0000 SK wrote on 2016/12/09 11:12: >> zfs list is good start. I never used zfs from within jail so I cannot >> comment on permission denied. I don't know what more must be done. >> > I'm not sure which list you are referring to. I could not find any zfs > list in FreeBSD mailing list lists I mean your command "zfs list", because normally "zfs list" inside jail print: "no datasets available" :) > But, what I would really like to have > > a) ONLY the relevant datasets for a jail are visible and can be > manipulated from within the jail. I do not mind if they are visible from > host (in fact, I might prefer that -- not manipulate, just see and maybe > take snapshot of what is there -- helps in centralizing backups). But > the Jails /must not/ see each others' datasets zfs create gT/JailS/testJail zfs set jailed=on gT/JailS/testJail << Did you set this property? # (populate & start jail) zfs jail testJail gT/JailS/testJail > b) if that is not achievable, maybe not allow the jails to see the > complete dataset hierarchy -- just make them feel that they are where > they are in a root, but still be able to create datasets that would > magically show up in the respective jails. This way, the total control > is from the host itself, where no one has access to, but the datasets > are restricted to different jails. What is visible is controlled by enforce_statfs values. If you create /tank/jail/alpha and set this path to you first jail no other jail will know about it. > Now, for the sysctl values, here they come sysctls seem OK, I am out of ideas now. maybe I will have time next week to try this on my test setup. Miroslav Lachman