nfs-server.service fails with error "exportfs: duplicated export entries"
This document (000021106) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15 SP4
SUSE Linux Enterprise Server 15 SP3
SUSE Linux Enterprise Server 15 SP3
SUSE Linux Enterprise Server 15 SP1
SUSE Linux Enterprise Server 12 SP5
SUSE Linux Enterprise Server 12 SP4
NFS Server
Situation
- /etc/exports contains duplicate entries, meaning that one path is being exported twice to the same client. In the example below, the hostname "nfs-client" resolves to IP 192.168.56.101, making these duplicate entries:
# cat /etc/exports /testnfs nfs-client(rw,root_squash,sync,no_subtree_check) /testnfs 192.168.56.101(rw,root_squash,sync,no_subtree_check)
- exportfs command on it's own is successful; however it reports a warning:
# exportfs -rav exportfs: duplicated export entries: exportfs: 192.168.56.101:/testnfs exportfs: nfs-client:/testnfs exporting nfs-client.example.com:/testnfs
- An error is shown during start (or restart) of nfs-server.service, after which nothing is exported:
$ systemctl restart nfs-server Job for nfs-server.service canceled.
- Status of nfs-server.service is shown as:
$ systemd -l status nfs-server.service ● nfs-server.service - NFS server and services Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) Drop-In: /usr/lib/systemd/system/nfs-server.service.d └─nfsserver.conf, options.conf /run/systemd/generator/nfs-server.service.d └─order-with-mounts.conf Active: failed (Result: exit-code) since Thu 2023-06-15 07:03:52 UTC; 10s ago Process: 25105 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE) Process: 25106 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS) Process: 25107 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS) Jun 15 07:03:52 nfs-server systemd[1]: Starting NFS server and services... Jun 15 07:03:52 nfs-server exportfs[25105]: exportfs: duplicated export entries: Jun 15 07:03:52 nfs-server exportfs[25105]: exportfs: 192.168.56.101:/testnfs Jun 15 07:03:52 nfs-server exportfs[25105]: exportfs: nfs-client:/testnfs Jun 15 07:03:52 nfs-server systemd[1]: nfs-server.service: Control process exited, code=exited, status=1/FAILURE Jun 15 07:03:52 nfs-server systemd[1]: nfs-server.service: Failed with result 'exit-code'. Jun 15 07:03:52 nfs-server systemd[1]: Stopped NFS server and services.
Resolution
systemctl restart nfs-server
The nfs-kernel-server package is also being updated to prevent nfs-server from treating this duplication as a fatal condition. The following versions will avoid the failure:
Distribution
|
Minimum version of nfs-kernel-server with the fix
|
SLES 15 SP5
|
2.1.1-150500.22.3.1
|
SLES 15 SP4
|
2.1.1-150100.10.37.1
|
SLES 15 SP3 LTSS
|
2.1.1-150100.10.37.1
|
SLES 15 SP2 LTSS
|
2.1.1-150100.10.37.1
|
SLES 15 SP1 LTSS
|
2.1.1-150100.10.37.1
|
SLES 12 SP5
|
1.3.0-34.50.1
|
Cause
However, it this message is returned while systemd is starting nfs-server.service, systemd will judge it as a fatal condition and cancel the start tasks. Before the warning message was added, duplicate entries themselves did not cause a failure.
The updated versions mentioned in the "Resolution" section will prevent systemd from treating this as fatal. The nfs-server service will be allowed to start successfully even in this condition.
Additional Information
"nfs-server.service" has an alias called "nfsserver.service" which is very often used. The alias will (in turn) run nfs-server.service. However, the alias will not report (on screen or in a "status" query) the error or failure. You must check "nfs-server.service" directly so see those.
For more information about exports and the correct syntax, please refer to the man page for "exports":
man exports
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021106
- Creation Date: 20-Jun-2023
- Modified Date:08-Jan-2024
-
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
- NFS Protocol
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com