Hello Kanji_Man,
I just got hit with this issue too. Although this was my second time setting up ZFS and first time setting up NFS so it was extra learning for me.
If you want an alternate hack just edit the daemon itself.
I commented out the relevant if clauses in the script such as the following.
..
Code:
# See how we were called.
case "$1" in
start)
export_files="/etc/exports"
for file in /etc/exports.d/*.exports ; do
if [ -f "$file" ]; then
export_files="$export_files $file"
fi
done
#if [ -f /etc/exports ] && grep -q '^[[:space:]]*[^#]*/' $export_files
#then
do_modprobe nfsd
# See if our running kernel supports the NFS kernel server
if ! grep -E -qs "[[:space:]]nfsd\$" /proc/filesystems; then
log_warning_msg "Not starting $DESC: no support in current kernel."
exit 0
fi
do_mount nfsd $PROCNFSD_MOUNTPOINT || NEED_SVCGSSD=no
log_begin_msg "Exporting directories for $DESC..."
$PREFIX/sbin/exportfs -r
RET=$?
if [ $RET != 0 ]; then
log_end_msg $RET
exit $RET
fi
log_end_msg 0
log_daemon_msg "Starting $DESC"
log_progress_msg "nfsd"
# See if rpcbind is running
/usr/sbin/rpcinfo -p >/dev/null 2>&1
RET=$?
if [ $RET != 0 ]; then
echo
log_warning_msg "Not starting: portmapper is not running"
exit 0
fi
start-stop-daemon --start --oknodo --quiet \
--nicelevel $RPCNFSDPRIORITY \
--exec $PREFIX/sbin/rpc.nfsd -- $RPCNFSDCOUNT
RET=$?
if [ $RET != 0 ]; then
log_end_msg $RET
exit $RET
fi
# make sure 127.0.0.1 is a valid source for requests
ClearAddr=
if [ -f /proc/net/rpc/auth.unix.ip/channel ]
then
fgrep -qs 127.0.0.1 /proc/net/rpc/auth.unix.ip/content || {
echo "nfsd 127.0.0.1 2147483647 localhost" >/proc/net/rpc/auth.unix.ip/channel
ClearAddr=yes
}
fi
$PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"
[ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
if [ "$NEED_SVCGSSD" = "yes" ]; then
do_modprobe rpcsec_gss_krb5
log_progress_msg "svcgssd"
start-stop-daemon --start --oknodo --quiet \
--exec $PREFIX/sbin/rpc.svcgssd -- $RPCSVCGSSDOPTS
RET=$?
if [ $RET != 0 ]; then
log_end_msg $RET
exit $RET
fi
fi
log_progress_msg "mountd"
start-stop-daemon --start --oknodo --quiet \
--exec $PREFIX/sbin/rpc.mountd -- $RPCMOUNTDOPTS
RET=$?
if [ $RET != 0 ]; then
log_end_msg $RET
exit $RET
fi
log_end_msg 0
#else
#log_warning_msg "Not starting $DESC: no exports."
#fi
;;
You can then blacklist the file from being upgraded or just re-edit it later.
Note - This was on Debian 7 for me so it might look a little different for you but it should be that simple.
I then just restarted the daemon and can see all the ZFS exports on the client.
I'm feeling sick today so hopefully I explained that OK, my brain isn't working very well.
Bookmarks