]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r367291:
authorMateusz Piotrowski <0mp@FreeBSD.org>
Tue, 10 Nov 2020 07:47:24 +0000 (07:47 +0000)
committerMateusz Piotrowski <0mp@FreeBSD.org>
Tue, 10 Nov 2020 07:47:24 +0000 (07:47 +0000)
commitcd13371c74a436968fc45fbb68e0904933159100
tree54bff26873895e09267cefda28456a818d332da2
parent1b68f5b0a74803ef4b3bb91ea5f9d5a8ddfb8634
MFC r367291:

rc.d/zfs: Add shutdown to KEYWORDS

The problem is that without walling /etc/rc.d/zfs on shutdown, resources
associated with ZFS mounts are not freed and the jails will remain in dying
state. In addition, the dataset is now in a dangling state, as the jail it
is attached to is dying.

A known workaround for jails was to add the following lines
to /etc/jail.conf, to make sure that "service zfs stop" is run
when the jail is stopped:

    exec.stop = "/bin/sh /etc/rc.shutdown";
    exec.stop += "/usr/sbin/service zfs stop || /usr/bin/true";

While the workaround seems to be okay-ish for the jail situation, it is
still unclean. However, for physical hosts this may wreak havoc with the
pool if shared spares are used, as "zfs unshare" is never invoked on
shutdown.

PR: 147444
Submitted by: Markus Stoff <markus__stoffdv_at>
Reported by: Mykah <mburkhardt__exavault_com>
Reviewed by: cy
Approved by: cy (src)
Relnotes: yes
libexec/rc/rc.d/zfs