From scottro11@gmail.com  Sun Feb  2 02:52:23 2014
Return-Path: <scottro11@gmail.com>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id 77DF6B7C
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Feb 2014 02:52:23 +0000 (UTC)
Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 365D913E5
	for <FreeBSD-gnats-submit@freebsd.org>; Sun,  2 Feb 2014 02:52:23 +0000 (UTC)
Received: by mail-qa0-f54.google.com with SMTP id i13so8389747qae.27
        for <FreeBSD-gnats-submit@freebsd.org>; Sat, 01 Feb 2014 18:52:22 -0800 (PST)
Received: from _HOSTNAME_ ([74.73.41.31])
        by mx.google.com with ESMTPSA id j65sm20662999qgj.18.2014.02.01.18.52.19
        for <FreeBSD-gnats-submit@freebsd.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sat, 01 Feb 2014 18:52:21 -0800 (PST)
Received: by _HOSTNAME_ (sSMTP sendmail emulation); Sat, 01 Feb 2014 21:55:03 -0500
Message-Id: <52edb2e5.c7218c0a.7d28.645a@mx.google.com>
Date: Sat, 01 Feb 2014 21:55:03 -0500
From: Scott Robbins <scottro11@gmail.com>
Reply-To: Scott Robbins <scottro11@gmail.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: jail using nullfs and unionfs doesn't mount devfs
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         186360
>Category:       kern
>Synopsis:       [jail] jail using nullfs and unionfs doesn't mount devfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-jail
>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:  Wed May 28 01:10:00 UTC 2014
>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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-jail 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Apr 20 03:17:50 UTC 2014 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186360 

From: Scott Robbins <scottro@nyc.rr.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/186360: jail using nullfs and unionfs doesn't mount devfs
Date: Mon, 26 May 2014 15:14:02 -0400

 Just an additional note--the roadrunner page listed will be defunct after
 May 31, 2014.  However, the page is available at
 http://www.srobb.net/nullfsjail.html
 -- 
 Scott Robbins
 PGP keyID EB3467D6
 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
 gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
 

From: "joeb1" <joeb1@a1poweruser.com>
To: <bug-followup@FreeBSD.org>,
	<scottro11@gmail.com>
Cc:  
Subject: Re: kern/186360: [jail] jail using nullfs and unionfs doesn&#39;t mount devfs
Date: Mon, 26 May 2014 18:56:31 -0400

 jail(8) became available in 9.1-RELEASE and was very buggy.
 Some things got fixed in 9.2 but not the mount devfs function.
 Even in 10.0-RELEASE the mount devfs function was still broken.
 
 It finally got fixed in 10.0-RELEASE-p1
 
 The legacy rc.conf rc.d jail method is deprecated in 10.0 and scheduled for
 removal in 11.0.
 
 Suggest you test your jails using jail(8) method on 10.0-RELEASE-p1 to
 verify your pr problem is still in effect.
 
 The sysutils/qjail utility uses the same jail config as your now building by
 hand.
 
 

From: Scott Robbins <scottro@nyc.rr.com>
To: joeb1 <joeb1@a1poweruser.com>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/186360: [jail] jail using nullfs and unionfs doesn&#39;t
 mount devfs
Date: Tue, 27 May 2014 21:05:18 -0400

 On Mon, May 26, 2014 at 06:56:31PM -0400, joeb1 wrote:
 > jail(8) became available in 9.1-RELEASE and was very buggy.
 > Some things got fixed in 9.2 but not the mount devfs function.
 > Even in 10.0-RELEASE the mount devfs function was still broken.
 > 
 > It finally got fixed in 10.0-RELEASE-p1
 
 I am still having the issue with 10.0-RELEASE-p1
 
 
 -- 
 Scott Robbins
 PGP keyID EB3467D6
 ( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
 gpg --keyserver pgp.mit.edu --recv-keys EB3467D6
 
>Unformatted:
