summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2020-11-03 10:02:52 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2020-11-03 10:02:52 +0000
commit0cadbd6cd258e2a889c49f42d3f61f85663eeb75 (patch)
treeefdde2f5c117ac9e3973bcc9617293e11c883347 /libexec
parenteaa5afcefabc3575437105b54fb31fc74eae4916 (diff)
downloadsrc-test2-0cadbd6cd258e2a889c49f42d3f61f85663eeb75.tar.gz
src-test2-0cadbd6cd258e2a889c49f42d3f61f85663eeb75.zip
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) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D27039
Notes
Notes: svn path=/head/; revision=367291
Diffstat (limited to 'libexec')
-rwxr-xr-xlibexec/rc/rc.d/zfs1
1 files changed, 1 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/zfs b/libexec/rc/rc.d/zfs
index 2d35f9b54642..102023175709 100755
--- a/libexec/rc/rc.d/zfs
+++ b/libexec/rc/rc.d/zfs
@@ -6,6 +6,7 @@
# PROVIDE: zfs
# REQUIRE: zfsbe
# BEFORE: FILESYSTEMS var
+# KEYWORD: shutdown
. /etc/rc.subr