Unkillable jails with jailed zfs filesystems

Erwin Lansing erwin at FreeBSD.org
Mon Jan 3 14:49:08 UTC 2011


Hi,

I've run into an issue where I can't kill off a jail as it keeps being
in state dying, most likely because some of its filesystems are still
busy.  Network connections have all timed out and all processes have
ended.  This is mostly a stock 8.1-RELEASE, however with the patch from
conf/149831 to jail its zfs filesystems and the problem is repeatable on
multiple machines.

Each jail has a large number of filesystems, each with different
properties, mounted under its root filesystem, e.g.

# zfs list -o name,mountpoint,jailed
tank/jail/jail1           /jails/jail1   off
tank/jail/jail1/home      /home          on
tank/jail/jail1/tmp       /tmp           on
tank/jail/jail2           /jails/jail2   off
tank/jail/jail2/home      /home          on
tank/jail/jail2/tmp       /tmp           on

So far so good, but "/etc/rc.d/jail stop jail1" will leave jail1 in
dying status.  'zfs destroy -r tank/jail/jail1' will report 'dataset
busy'.  Even worse, 'zfs destroy -f tank/jail/jail1/tmp' will still
return a dataset busy, but also turn /tmp inside jail2 (!!) into mode
755, which of course leads to all kinds of fun in that jail.

Any pointers to how to narrow down this issue welcome (and review of the
above PR, which has set in GNATS for half a year now, as well :-)

Cheers,
-erwin


-- 
Erwin Lansing                       (o_ _o)       http://droso.org
Ceterum censeo                   \\\_\   /_///
Carthaginem esse delendam        <____) (____>    erwin at lansing.dk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-jail/attachments/20110103/2820993d/attachment.pgp


More information about the freebsd-jail mailing list