From owner-freebsd-stable@FreeBSD.ORG Fri Aug 9 10:57:45 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 126BAA0A; Fri, 9 Aug 2013 10:57:45 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A62312FB1; Fri, 9 Aug 2013 10:57:44 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.7/8.14.7) with ESMTP id r79AvdST065941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Aug 2013 12:57:39 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.7/8.14.7/Submit) with ESMTP id r79AvdDU065938; Fri, 9 Aug 2013 12:57:39 +0200 (CEST) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Fri, 9 Aug 2013 12:57:38 +0200 (CEST) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: George Kontostanos Subject: Re: ZFS in jails 9.2-RC1 permission denied In-Reply-To: Message-ID: References: <1375963160.29686.7487435.7323F707@webmail.messagingengine.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-2124911918-1376045859=:90799" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.fig.ol.no Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Aug 2013 10:57:45 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-2124911918-1376045859=:90799 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Fri, 9 Aug 2013 13:35+0300, George Kontostanos wrote: > On Fri, Aug 9, 2013 at 8:55 AM, Trond Endrestøl < > Trond.Endrestol@fagskolen.gjovik.no> wrote: > > > On Thu, 8 Aug 2013 19:04+0300, George Kontostanos wrote: > > > > > On Thu, Aug 8, 2013 at 2:59 PM, Mark Felder wrote: > > > > > > > On Thu, Aug 8, 2013, at 6:53, George Kontostanos wrote: > > > > > > > > > > Anybody? > > > > > > > > > > > > > Can you provide your jail configuration? I think 9.2 introduces the new > > > > /etc/jail.conf functionality and perhaps it somehow it broke the way > > you > > > > were doing it previously? If so, the old method is supposed to be work > > > > as well... > > > > > > jail_enable="YES" > > > jail_list="jail1" > > > jail_jail1_rootdir="/tank/jails/jail1" > > > jail_jail1_hostname="jail1" > > > jail_jail1_interface="em0" > > > jail_jail1_ip="172.16.154.32" > > > jail_jail1_devfs_enable="YES" > > > > During my experimentation yesterday, I had to add: > > > > jail_jail1_parameters="enforce_statfs=1 allow.mount=1 allow.mount.zfs=1" > > > > I wish there was a way of executing a command in the host environment > > _after_ the jail is created, but _before_ exec.start is run from > > within the jail environment, exec.prestart is run in the host > > environment before the jail is created and is of no use for attaching > > a ZFS dataset to a particular jail with the zfs jail command. > > > > Until this issue is resolved, I see no other way than manually > > attaching a ZFS dataset to a jail, and manually running the mount > > command from within the jail environment. > > Excellent, this worked like a charm! > > Does this means that the sysctl parameters are not honored or they have to > be also passed in the jail parameters? I guess so. Setting the sysctls in /etc/sysctl.conf doesn't seem to propagate to the jail environments at all in 9.2-BETA2. > Thanks! You're welcome, and thanks for pushing me to explore jails and ZFS even further. ;-) Maybe the jail people should erect exec.afterprestart, enabling us to attach ZFS datasets to our jails prior to launching the jails. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ --2055831798-2124911918-1376045859=:90799--