Bug 131441 - [unionfs] [nullfs] unionfs and/or nullfs not combineable
Summary: [unionfs] [nullfs] unionfs and/or nullfs not combineable
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-06 00:40 UTC by Hannes Hauswedell
Modified: 2023-07-29 03:17 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hannes Hauswedell 2009-02-06 00:40:01 UTC
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/
%
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-08-24 12:52:30 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Romain Garbage 2011-11-07 20:06:18 UTC
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
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:56 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped