When creating a uniofs based chroot I discovered some strange behaviour with dev/. Fix: Workaround: # mkdir bottom-p bottom/dev top # mount -t unionfs -o below bottom top # mount -t tmpfs tmdevfs devfs top/dev # touch top/dev How-To-Repeat: # mkdir bottom-p bottom/dev top # mount -t unionfs -o below bottom top # mount -t tmpfs tmdevfs devfs top/dev # ls -l top/dev/null ls: top/dev/null: No such file or directory # touch top/dev/null # ls -l top/dev/null -rw-r--r-- 1 root wheel 0 Jan 20 16:35 top/dev/null # touch top/dev # ls -l top/dev/null crw-rw-rw- 1 root wheel 0, 18 Jan 20 16:34 top/dev/null
Another example, this time using nullfs: # mkdir -p bottom top nullfs/dir top/mnt # touch nullfs/dir/file # mount -t unionfs bottom top # mount -t nullfs nullfs top/mnt # ls top/mnt/dir/ ls: top/mnt/dir/: No such file or directory # ls top/mnt/ dir # ls top/mnt/dir/ file
Responsible Changed From-To: freebsd-bugs->daichi Over to maintainer.
State Changed From-To: open->open commit bit has been taken in for safekeeping.
Responsible Changed From-To: daichi->freebsd-fs
This bug is still applicable on FreeBSD 10.1-RELEASE
This is still an issue on FreeBSD 11.2. The issue appears to be that unionfs requires a ls(1) (I'm guessing a lstat) before it will allow traversing of the directory...