svn commit: r367546 - stable/12/libexec/rc/rc.d
Mateusz Piotrowski
0mp at FreeBSD.org
Tue Nov 10 07:47:25 UTC 2020
Author: 0mp (doc,ports committer)
Date: Tue Nov 10 07:47:24 2020
New Revision: 367546
URL: https://svnweb.freebsd.org/changeset/base/367546
Log:
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
Modified:
stable/12/libexec/rc/rc.d/zfs
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/libexec/rc/rc.d/zfs
==============================================================================
--- stable/12/libexec/rc/rc.d/zfs Tue Nov 10 02:26:44 2020 (r367545)
+++ stable/12/libexec/rc/rc.d/zfs Tue Nov 10 07:47:24 2020 (r367546)
@@ -6,6 +6,7 @@
# PROVIDE: zfs
# REQUIRE: zfsbe
# BEFORE: FILESYSTEMS var
+# KEYWORD: shutdown
. /etc/rc.subr
More information about the svn-src-stable
mailing list