[Bug 222951] Re-starting a jail with mount.devfs mounts devfs multiple times

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Oct 12 13:07:17 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222951

            Bug ID: 222951
           Summary: Re-starting a jail with mount.devfs mounts devfs
                    multiple times
           Product: Base System
           Version: 11.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: vlad-fbsd at acheronmedia.com

Starting a jail that's configured with 'mount.devfs' with `jail -c` does not
check if devfs is already mounted and mounts it again.

The problem seems to be when the (nopersist) jail is stopped by itself because
all the processes in it have exited, so it wasn't explicitly `jail -r`. When
that happens, devfs is not unmounted.

So next time the jail is started, devfs is mounted again, resulting with
multiple mounts of devfs into $JAIL_ROOT/dev:

> % mount | grep /zroot/jails/test/dev
> devfs on /zroot/jails/test/dev (devfs, local, multilabel)
> devfs on /zroot/jails/test/dev (devfs, local, multilabel)
> devfs on /zroot/jails/test/dev (devfs, local, multilabel)
> devfs on /zroot/jails/test/dev (devfs, local, multilabel)

If the jail is explicitly stopped with `jail -r`, devfs is unmounted.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list