Skip to content

Commit

Permalink
Do not enable zfs-share.service
Browse files Browse the repository at this point in the history
zfs-share.service executes `zfs share` on every boot to share any
filesystem/s, that are shared over SMB and/or NFS using the
sharesmb and sharenfs properties.

Since we do not rely on these properties to share over SMB and NFS
and the service fails on boot on TrueNAS if sharesmb and/or
sharenfs properties are set, and we rely on middleware to control
the SMB and NFS shares, zfs-share.service should be disabled for
TrueNAS SCALE.

Signed-off-by: Umer Saleem <[email protected]>
  • Loading branch information
usaleem-ix committed Sep 20, 2023
1 parent 50ed8e6 commit 93337f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion contrib/debian/rules.in
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ override_dh_installinit:
dh_installinit -r --no-restart-after-upgrade --name zfs-import
dh_installinit -r --no-restart-after-upgrade --name zfs-mount
dh_installinit -r --no-restart-after-upgrade --name zfs-load-key
dh_installinit -R --name zfs-share
dh_installinit -R --name zfs-zed

override_dh_installsystemd:
Expand Down
2 changes: 1 addition & 1 deletion etc/systemd/system/50-zfs.preset
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ enable zfs-import-cache.service
disable zfs-import-scan.service
enable zfs-import.target
enable zfs-mount.service
enable zfs-share.service
disable zfs-share.service
enable zfs-zed.service
enable zfs-volume-wait.service
enable zfs.target
2 changes: 1 addition & 1 deletion etc/systemd/system/zfs-share.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ EnvironmentFile=-@initconfdir@/zfs
ExecStart=@sbindir@/zfs share -a

[Install]
WantedBy=zfs.target
WantedBy=multi-user.target

0 comments on commit 93337f5

Please sign in to comment.