From owner-freebsd-fs@FreeBSD.ORG Sun Feb 3 14:55:07 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 55A1E6B5; Sun, 3 Feb 2013 14:55:07 +0000 (UTC) (envelope-from lukasz@wasikowski.net) Received: from mail.wasikowski.net (mail.wasikowski.net [IPv6:2001:6a0:1cb::b]) by mx1.freebsd.org (Postfix) with ESMTP id 1113CA88; Sun, 3 Feb 2013 14:55:07 +0000 (UTC) Received: from mail.wasikowski.net (mail.wasikowski.net [IPv6:2001:6a0:1cb::b]) by mail.wasikowski.net (Postfix) with ESMTP id 2512F46F; Sun, 3 Feb 2013 15:54:58 +0100 (CET) X-Virus-Scanned: amavisd-new at wasikowski.net Received: from mail.wasikowski.net ([91.204.91.44]) by mail.wasikowski.net (scan.wasikowski.net [91.204.91.44]) (amavisd-new, port 10026) with ESMTP id f_7hc1LEVGUa; Sun, 3 Feb 2013 15:54:57 +0100 (CET) Received: from [192.168.168.2] (89-72-12-251.dynamic.chello.pl [89.72.12.251]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: lukasz@wasikowski.net) by mail.wasikowski.net (Postfix) with ESMTPSA id BBB2F46B; Sun, 3 Feb 2013 15:54:57 +0100 (CET) Message-ID: <510E7A41.3070101@wasikowski.net> Date: Sun, 03 Feb 2013 15:54:57 +0100 From: =?UTF-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ==?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: freebsd-fs@freebsd.org, freebsd-jail@freebsd.org Subject: Problem with zfs mount all in jails X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Feb 2013 14:55:07 -0000 Hi, I've got a problem with automation of zfs mount in a jail. I'm using 9.1-STABLE r246099 and ezjail to manage jails. Each jail has it's own dataset, and I want to delegate another dataset(s) which can be managed from inside a jail. 1. Dataset for jail: # zfs list jinx/jails/jtest NAME USED AVAIL REFER MOUNTPOINT jinx/jails/jtest 50.7M 18.5G 1.59M /data/jails/jtest 2. Dataset for injail management: # zfs list jinx/jails/jtest/www NAME USED AVAIL REFER MOUNTPOINT jinx/jails/jtest/www 63K 18.5G 32K /data/www # zfs get jailed jinx/jails/jtest/www NAME PROPERTY VALUE SOURCE jinx/jails/jtest/www jailed on local 3. Some ezjail settings for this jail (/usr/local/etc/ezjail/jtest file): export jail_jtest_rootdir="/data/jails/jtest" export jail_jtest_mount_enable="YES" export jail_jtest_devfs_enable="YES" export jail_jtest_devfs_ruleset="devfsrules_jail" export jail_jtest_parameters="allow.mount.zfs=1 allow.mount=1 enforce_statfs=1 allow.raw_sockets=1" export jail_jtest_zfs_datasets="jinx/jails/jtest/www" 4. In jail's rc.conf zfs is enabled: # grep zfs /data/jails/jtest/etc/rc.conf zfs_enable="YES" 5. I start jail (service ezjail start) and got this: # jexec 1 zfs get mounted jinx/jails/jtest/www NAME PROPERTY VALUE SOURCE jinx/jails/jtest/www mounted no - But when I run: # jexec 1 service zfs start dataset gets mounted # jexec 1 zfs get mounted jinx/jails/jtest/www NAME PROPERTY VALUE SOURCE jinx/jails/jtest/www mounted yes - What am I missing? Why is zfs mount -a (which should be invoked by /etc/rc.d/zfs) not launched on jail start but works when I run zfs service manually? -- best regards, Lukasz Wasikowski