Bug 120288 - zfs(8): "zfs share -a" does not send SIGHUP to mountd
Summary: zfs(8): "zfs share -a" does not send SIGHUP to mountd
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 7.0-BETA4
Hardware: Any Any
: Normal Affects Only Me
Assignee: Pawel Jakub Dawidek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-05 11:20 UTC by Victor Sudakov
Modified: 2009-09-07 21:12 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Sudakov 2008-02-05 11:20:00 UTC
The command "zfs share -a" does not make mountd reread the configuration
file. One must send SIGHUP manually so that mountd notices changes in
/etc/zfs/exports

Fix: 

A workaround: you can use "killall -HUP mountd" after every "zfs share
-a" command.
How-To-Repeat: 1. Set the "sharenfs=on" property on some filesystem within zfs.
2. Say "zfs unshare -a"
3. Say "zfs share -a"

You won't be able to see the shares (e.g. in "showmount -e") unless you
send SIGHUP to mountd manually.
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2008-02-05 11:45:18 UTC
State Changed
From-To: open->closed

Imo this is intended behaviour, no where in the manual is stated that 
this should be possible etc. Also when you add new shares in NFS you 
should also restart mountd/sighup it, so that the new shares become 
visible, why should this be handled differently? Thanks for using 
FreeBSD though!
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2009-05-28 23:22:33 UTC
Responsible Changed
From-To: pjd->freebsd-fs

With pjd's permission, reassing ZFS-related PRs to freebsd-fs.
Comment 3 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:44:36 UTC
State Changed
From-To: closed->open

ZFS should send SIGHUP to mountd. 


Comment 4 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:44:36 UTC
Responsible Changed
From-To: freebsd-bugs->pjd

I'll take this one.
Comment 5 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:44:36 UTC
State Changed
From-To: open->closed

I think the problem you were seeing was related to bug in pidfile(3), 
which was fixed some time ago. There was also another bug in detecting 
if file system is shared which I just fixed. Now the following commands 
should properly remove file systems from the 'showmount -e' output: 

# zfs unshare -a 
# zfs destroy foo/bar 
# zfs rename foo/bar foo/baz 

Thanks for the report! 


Comment 6 Pawel Jakub Dawidek freebsd_committer freebsd_triage 2014-06-01 06:44:36 UTC
Responsible Changed
From-To: freebsd-fs->pjd

I'll take this one.