[ZFS] sharenfs stable/7 # !!! DO NOT EDIT THIS FILE MANUALLY !!!

jhell jhell at DataIX.net
Mon Mar 1 23:30:28 UTC 2010


Hi FS,

After exporting some filesystems from zfs via sharenfs I decided to turn 
the shares back off after I was done with them on another machine. To my 
surprise the datasets that I had shared previously were still shared.

FreeBSD 7.3-STABLE #0 r204486 Sun Feb 28 19:42:46 EST 2010

Process:

# This command adds the share through nfs in /etc/zfs/exports
zfs set sharenfs='-maproot=0 disbatch' exports/svn

bla bla bla after using them for a little while:

# This command should turn off the nfs share and remove the line from 
# /etc/zfs/exports and signal mountd or whatever.
zfs set sharenfs=off exports/svn

Low and behold this line is never removed the share and continues even 
through a reboot all while sharenfs=off on the dataset. No no other 
datasets are shared at this time.

The line in /etc/zfs/exports changes just fine when changing the options 
via "zfs set sharenfs".

I also removed /etc/zfs/exports and repeated the process. It still 
continued.

Should a PR be filed ?, Can someone take a look at this ?.

Relevant man page section below sig.

-- 

  jhell

sharenfs=on | off | opts

Controls whether the file system is shared via NFS, and what options are 
used. A file system with a"sharenfs" property of "off" is managed through 
traditional tools such as share(1M), unshare(1M), and dfstab(4). 
Otherwise, the file system is automati- cally shared and unshared with the 
"zfs share"  and "zfs unshare" commands.  If the property is set to "on", 
the share(1M) command is invoked with no options.  Otherwise, the 
share(1M)  command is invoked with options equivalent to the contents of 
this property.

When the "sharenfs" property is changed for a dataset, the dataset and any 
children inheriting the property are re-shared with the new options, only 
if the property was previously "off", or if they were shared before the 
property was changed.  If the new property is "off", the file systems are 
unshared.


More information about the freebsd-fs mailing list