Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am performing the following on FreeBSD 9.0-STABLE:

mount_nullfs /foo /jail/foo

After that, from within the host system, the mount works. So this works:

touch /foo/bar && ls /jail/foo/bar

But when I change into the jail the mounted directory is empty:

jexec 1 tcsh
ls /foo/bar

I get:

ls: /foo/bar: No such file or directory

/foo is completely empty.

How can I have the files in the mounted directory show up correctly when mounted inside the chroot as found in the host system?

share|improve this question
Did you restart the jail after mounting the nullfs? – D_Bye Feb 4 '13 at 14:43

I just found out that I had mounted onto a directory which itself is already rebound (mounted via nullfs).

/var/data/home/j/mroot on /var/data/home/j/www
/var/data/home/js/www on /var/data/home/j/www/s
/foo on /var/data/home/js/www/foo

Besides being confusing this is apparently unsupported / wrong.

I changed it like so (note the path in the last line):

/var/data/home/j/mroot on /var/data/home/j/www
/var/data/home/js/www on /var/data/home/j/www/s
/foo on /var/data/home/j/www/s/foo

Now the mount works without any additional settings.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.