jailed NFS server

Phillip Nordwall Phillip.Nordwall+FreeBSD+bugbusting at gmail.com
Wed Mar 28 20:26:28 UTC 2012


Good luck, and if you have success let us know. We had 2 people with
FreeBSD server experience spend 3 days each on getting this to work on
FreeBSD 8.0 before giving up do to other pressing business.

Phillip Nordwall

On Wed, Mar 28, 2012 at 1:20 PM, Beeblebrox <zaphod at berentweb.com> wrote:

> 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 <http://192.168.2.0/24%0Anfsd[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.
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>


More information about the freebsd-fs mailing list