kern/176482: [jail] Jails not unmounting devfs on exit

jamie at jamie at
Thu Mar 28 21:17:40 UTC 2013

Synopsis: [jail] Jails not unmounting devfs on exit

State-Changed-From-To: open->closed
State-Changed-By: jamie
State-Changed-When: Thu Mar 28 21:09:47 UTC 2013
Working as expected.

When mount.devfs (or any other sort of mount) is given on the command
line along with the -c option, that mount is duly made as part of the
jail creation.  But there is nowhere to mark those mount points as
"belonging" to that ephemeral jail, or to mark the jail as having those
mounts.  When such a jail is them removed, there's then no way to know
the directory should be unmounted.

If you want to keep track of such things for proper handling in later
removal, you should put those options in /etc/jail.conf (or some other
config file that you should take care to include in the removal command
line.  Then the jail's parameters will be read when the jail is removed,
and all of the desired takedown steps can occur - including not only
unmounting a dev directory, but running rc.shutdown and other good

More information about the freebsd-jail mailing list