# mountd can't open /etc/exports



## cm-vdp (Apr 30, 2020)

Our FreeBSD servers (12.1-RELEASE-p2) are connecting to a NFS4 server (RedHat 7)
On one FreeBSD server the following message appears (/var/log/messages) when mounting the NFS share: `mountd[656]: can't open /etc/exports`
The share is mounted correctly. I only was wondering why this message appears. 
There is no exports file, because this FreeBSD server doesn't act as an NFS server.
Entry in /etc/fstab

```
nfsserver:/exports  /backup      nfs     bg,exec,rw,nfsv4,soft,intr,wsize=8192,rsize=8192        0       0
```
Entry in /etc/exports on the nfs-server

```
/exports              freebsd-server(fsid=0,ro,async,insecure)
```
Output of mount command:

```
mount -v /backup
nfsserver:/exports on /backup (nfs, nfsv4acls, fsid 48ff003a3a000000)
```
The other FreeBSD servers (same version, configuration) doesn't have this "problem".


----------



## George (Apr 30, 2020)

Maybe you should mount with the -r flag?
/etc/exports uses ro (read only). Not sure though.


----------



## SirDice (Apr 30, 2020)

cm-vdp said:


> At 1 freebsd-server the following message appears (var/log/messages) when mounting the nfs-share : `mountd[656]: can't open /etc/exports`
> The share is mounted correctly. I only was wondering why this message appears.
> There is no exports-file, because this freebsd-server doesn't act as a nfs-server.


What's in the rc.conf of that machine?


----------



## cm-vdp (May 4, 2020)

```
# start enabling services
sshd_enable="YES"
ntpd_enable="YES"
nfs_client_enable="YES"

# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"

# enable the zabbix agent
zabbix_agentd_enable="YES"

# Disable sendmail and enable Postfix
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

# We use ZFS as backup mount
zfs_enable="YES"

# Enable the NFS client and server
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"

# PostgreSQL server enable
postgresql_enable="YES"
postgresql_initdb_flags="--encoding=utf-8 --locale=C"

# Enable VMware guest tools
vmware_guestd_enable="yes"
vmware_guest_vmxnet_enable="yes"
vmware_guest_vmblock_enable="yes"
vmware_guest_vmmemctl_enable="yes"
```


----------



## cm-vdp (May 4, 2020)

I have to ask at our department why nfs-server is enabled and running, because there's nothing to share on this server.
(I still receive the messages after stopping the nfsd)


----------

