From owner-freebsd-fs@FreeBSD.ORG Wed Mar 28 20:20:38 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9D15B106566B for ; Wed, 28 Mar 2012 20:20:38 +0000 (UTC) (envelope-from rsb@berentweb.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 15B8B8FC12 for ; Wed, 28 Mar 2012 20:20:37 +0000 (UTC) Received: by lagv3 with SMTP id v3so2344486lag.13 for ; Wed, 28 Mar 2012 13:20:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berentweb.com; s=google; h=mime-version:sender:x-originating-ip:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=tc9QPNc7Hwp/6Fl0GaxpFQuws+gnpf2/4fex0djlHcc=; b=MjauLXxIBrC2nCM4+jT9xax2bNTE3zyzocZWGQmCGdRF4Lt6Y+pvm3UEjlG52FKOYu tuIgOMz2XP90lDofQlqtNeLWruTuxyVFQWG380ILXIdjVpYBcKwV4Hbz7KcN/e1QmYDX c+XZ9BENtVzkjVFJf9k3xychvoc41Q3c9043s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:x-originating-ip:date:x-google-sender-auth :message-id:subject:from:to:content-type:x-gm-message-state; bh=tc9QPNc7Hwp/6Fl0GaxpFQuws+gnpf2/4fex0djlHcc=; b=fEg8DHAFRv698iFq97jPpqYw7UBv2hNPlX5XmffS9zY/hOjiT1h2YQsXqHAvoBk66D 5OQ2qq/oGDyd2lbnrGSzoPTQz22aLiUG0x/+Zbql82LBrLTizAwo7+YS0VaoKgKmRc+F 0tAMdGktp2Ybi6lWuE/Pw2vWBkWRsGlyU0NdtWx2Riw4MLF4lkf6jbibDbH1g5lWX05w z6p4qjTKjkWlLN/NvrMAckmIKdahnFjLil3g3lZt0F407Mw3kRKZuJbmMr+lVvi3in4v BOkKOEYBf9ue28sQbU9tzeulXz9sorzZ98n/SgTmbBz4ZBuKANrSs0sxgmdmKkXQuZHU Jl+Q== MIME-Version: 1.0 Received: by 10.152.105.241 with SMTP id gp17mr26858987lab.21.1332966036843; Wed, 28 Mar 2012 13:20:36 -0700 (PDT) Sender: rsb@berentweb.com Received: by 10.112.77.15 with HTTP; Wed, 28 Mar 2012 13:20:36 -0700 (PDT) X-Originating-IP: [85.110.91.209] Date: Wed, 28 Mar 2012 23:20:36 +0300 X-Google-Sender-Auth: G_sY4JSUX-GSbeHATTJSb73rRDc Message-ID: From: Beeblebrox To: freebsd-fs@freebsd.org X-Gm-Message-State: ALoCoQkcrZkJlICeHQS4Mz6P53UWOtaDidFFwh31Jtkby2rDGlX62rYeSn7YvR3Fq1STceAWkzdU Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: jailed NFS server 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: Wed, 28 Mar 2012 20:20:38 -0000 Is it possible to get an NFS server working from inside a Jail, where host storage is on ZFS? I get errors from mountd and nfsd when started inside jail (exports file has no V4 line and simple one-line test export). mountd & nfsd errors are: mountd[2580]: Can't delete exports for V4: mountd[2580]: can't delete exports for /: Operation not permitted mountd[2580]: can't change attributes for /home mountd[2580]: bad exports list line /home -network 192.168.2.0/24 nfsd[2583]: Can't read stable storage file I have a modified host /etc/sysctl.conf as below, per post by PJD: http://www.mailinglistarchive.com/html/freebsd-current@freebsd.org/2007-07/msg01185.html Not that I really know whether these settings are valid, but at least I got rid of rpcbind errors. > > > security.jail.jailed: 1 > > > security.jail.mount_allowed: 1 > > > security.jail.chflags_allowed: 1 > > > security.jail.allow_raw_sockets: 0 > > > security.jail.enforce_statfs: 2 > > > security.jail.sysvipc_allowed: 1 > > > security.jail.socket_unixiproute_only: 1 > > > security.jail.set_hostname_allowed: 1 > > > ## security.jail.enforce_statfs=0 > > > vfs.nfsd.nfs_privport=1 > > > vfs.nfsd.server_max_nfsvers=4 Then I start NFS manually form inside jail to observe any faults (Jail IP is 192.168.2.1): #> service rpcbind onestart -h 192.168.2.1 #> service mountd onestart -r -n -p 59 -l -h 192.168.2.1 #> service nfsd onestart -u -t -n 4 -l -h 192.168.2.1 Thanks & Regards.