[Pkg-zfsonlinux-devel] [PATCH 1/4] Run `zfs ushare -a` before iscsi during shutdown.

Richard Laager rlaager at wiktel.com
Sun Sep 15 07:19:51 UTC 2013


From: Darik Horn <dajhorn at vanadac.com>

For Ubuntu, change the /etc/init.d/zfs-share sysv sequence numbers
so that it unshares filesystems before the iSCSI target is stopped
during system shutdown.

This resolves the error:

	* Removing iSCSI enterprise target modules: [fail]
	  FATAL: Module iscsi_trgt module is in use.
	* Killing all remaining processes... [fail]

Closes: zfsonlinux/zfs#1271
---
 debian/rules |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 7695295..a38a880 100755
--- a/debian/rules
+++ b/debian/rules
@@ -111,13 +111,15 @@ endif
 
 	@# Install the /etc/init.d/zfs-share script.
 ifeq ($(LSB_DISTRIBUTOR),Debian)
-	@# Debian runs nfs-kernel-server at sysv sequence 17 01.
+	@# Debian runs nfs-kernel-server at sysv sequence 17 01,
+	@# iscsitarget at 02 01, and samba at 01 02.
 	dh_installinit --name=zfs-share \
 	  --no-restart-on-upgrade --no-start -- defaults 18 00
 else ifeq ($(LSB_DISTRIBUTOR),Ubuntu)
-	@# Ubuntu runs nfs-kernel-server at sysv sequence 20 80.
+	@# Ubuntu runs nfs-kernel-server at sysv sequence 20 80,
+	@# iscsitarget at 20 20, and samba through upstart.
 	dh_installinit --name=zfs-share \
-	  --no-restart-on-upgrade --no-start -- defaults 21 79
+	  --no-restart-on-upgrade --no-start -- defaults 21 19
 else
 	dh_installinit --name=zfs-share \
 	  --no-restart-on-upgrade --no-start
-- 
1.7.9.5




More information about the Pkg-zfsonlinux-devel mailing list