Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Feb 2014 21:55:03 -0500
From:      Scott Robbins <scottro11@gmail.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/186360: jail using nullfs and unionfs doesn't mount devfs
Message-ID:  <52edb2e5.c7218c0a.7d28.645a@mx.google.com>
Resent-Message-ID: <201402020300.s12300tX046242@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186360
>Category:       misc
>Synopsis:       jail using nullfs and unionfs doesn't mount devfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 02 03:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Scott Robbins
>Release:        FreeBSD 10.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD clevo1.scottro.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r261350: Sat Feb 1 08:40:58 EST 2014 root@clevo1.scottro.net:/usr/obj/usr/src/sys/GENERIC amd64


	
>Description:
	When creating a jail to share a nullfs jail, as described in detail at http://home.roadrunner.com/~computertaijutsu/nullfsjail.html, based
on the article at https://www.freebsd.org/doc/handbook/jails-application.html, devfs does not get mounted on the application jail, despite an
entry for it in /etc/jail.conf.  When using a standard jail (or jails), devfs does mount as expected.   
However, when using the nullfs method to share jails, after the application jail is started, its /dev only shows two directories, log and null.
I realize that this is a fairly uncommon use case, but it is something that worked without problem in FreeBSD-9.2, (although in that case, entries 
were made in /etc/rc.conf rather than /etc/jail.conf


 
How-To-Repeat:
	Install a jail as described in the link above, that shares a filesystem with a nullfs jail.   
Have the entry for the application jail to mount devfs and start the jail.

An example jail.conf entry

www_jail {
	path = /jails/_www_jail;
	mount.devfs;
	devfs_ruleset = 4;
	host.hostname = www_jail;
	ip4.addr = 192.168.1.199;
	exec.start = "/bin/sh /etc/rc";
	exec.stop = "/bin/sh /etc/rc.shutdown";
}


>How-To-Repeat:
>Fix:

The only workarounds that I have found are to either manually mount devfs after starting the jail 
or to create an /etc/rc.local with a line to mount devfs on each application jail.  




>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52edb2e5.c7218c0a.7d28.645a>