Date: Wed, 28 Mar 2012 23:20:36 +0300 From: Beeblebrox <zaphod@berentweb.com> To: freebsd-fs@freebsd.org Subject: jailed NFS server Message-ID: <CAPSTskvLbixeyYW9BWFR0bSfJ3%2Br59ZYHHLyJAaYFERobO6O=w@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPSTskvLbixeyYW9BWFR0bSfJ3%2Br59ZYHHLyJAaYFERobO6O=w>