From nobody@FreeBSD.org  Fri Feb  6 00:37:36 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53DD6106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  6 Feb 2009 00:37:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 41DB48FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  6 Feb 2009 00:37:36 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n160baCu029735
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 6 Feb 2009 00:37:36 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n160baLZ029734;
	Fri, 6 Feb 2009 00:37:36 GMT
	(envelope-from nobody)
Message-Id: <200902060037.n160baLZ029734@www.freebsd.org>
Date: Fri, 6 Feb 2009 00:37:36 GMT
From: Hannes Hauswedell <freebsd@soulrebel.in-berlin.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: unionfs and/or nullfs not combineable 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131441
>Category:       kern
>Synopsis:       [unionfs] [nullfs] unionfs and/or nullfs not combineable
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 06 00:40:01 UTC 2009
>Closed-Date:    
>Last-Modified:  Mon Nov  7 20:40:06 UTC 2011
>Originator:     Hannes Hauswedell
>Release:        7.1-Release
>Organization:
>Environment:
FreeBSD serv.lan.home 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan  1 14:37:25 UTC 2009     root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Contrary to what mount_unionfs(8) reads [1] you cannot mount a unionfs over a tree that contains mounted nullfses further down. (Well you can, but those nullfses will dissappear).

This is the same with just using nullfses oder just unionfses.

I don't know if this is intentional or if it can be changed, but I thought I'd report it.

[1] "The union file system manipulates the namespace, rather than individual file systems. The union operation applies recursively down the directory tree now rooted at uniondir Thus any file systems which are mounted under uniondir will take part in the union operation."
>How-To-Repeat:
%cd /tmp/
%mkdir TEST1
%mkdir TEST1/SUB
%mount_nullfs /bin/ /tmp/TEST1/SUB/
%mkdir /tmp/TEST2
%ls /tmp/TEST1/SUB/
[          chmod      dd         ed         kenv       ls         pgrep      rcp        rmail      sleep      test
cat        cp         df         expr       kill       mkdir      pkill      realpath   rmdir      stty       unlink
chflags    csh        domainname getfacl    link       mv         ps         red        setfacl    sync       uuidgen
chio       date       echo       hostname   ln         pax        pwd        rm         sh         tcsh
%mount_unionfs /tmp/TEST2 /tmp/TEST1
%ls /tmp/TEST1/SUB/
%
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Aug 24 11:52:30 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

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

From: Romain Garbage <romain.garbage@gmail.com>
To: bug-followup@FreeBSD.org, freebsd@soulrebel.in-berlin.de
Cc:  
Subject: Re: kern/131441: [unionfs] [nullfs] unionfs and/or nullfs not combineable
Date: Mon, 7 Nov 2011 21:06:18 +0100

 It seems that this is not only true for nullfs but also for ufs and zfs:
 
 # mkdir -p /tmp/testdir/{ufs,zfs}
 # mount /dev/ufs/test /tmp/testdir/ufs
 # zfs create -o mountpoint=/tmp/testdir/zfs pool/test
 # touch /tmp/testdir/zfs/testfile
 # touch /tmp/testdir/ufs/testfile
 # ls /tmp/testdir/ufs
 testfile
 # ls /tmp/testdir/zfs
 testfile
 # mkdir /tmp/testdir2
 # mount_unionfs /tmp/testdir2 /tmp/testdir
 # ls /tmp/testdir/ufs
 # ls /tmp/testdir/zfs
 #
 
 Submounts are not accessible if a unionfs is mounted on a directory.
 
 Regards,
 Romain
>Unformatted:
