exportfs: /srv/nfs does not support NFS export

When trying to configure an NFS share it’s possible the following error happens: exportfs: /srv/nfs does not support NFS export. Chances are you are trying to share an exFAT formatted drive on a Linux system.

exportfs: /srv/nfs does not support NFS export on exFAT drive

A more verbose output from the systemd nfs-server.service would look something like this:

$ systemctl status nfs-server.service
* nfs-server.service - NFS server and services
     Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; preset: disabled)
    Drop-In: /run/systemd/generator/nfs-server.service.d
             `-order-with-mounts.conf
     Active: active (exited) since Tue 2022-08-16 19:06:30 CEST; 1h 15min ago
    Process: 549 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=1/FAILURE)
    Process: 550 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
   Main PID: 550 (code=exited, status=0/SUCCESS)
        CPU: 33ms

Aug 16 19:06:30 alarm systemd[1]: Starting NFS server and services...
Aug 16 19:06:30 alarm exportfs[549]: exportfs: /srv/nfs does not support NFS export
Aug 16 19:06:30 alarm rpc.nfsd[550]: rpc.nfsd: Unable to request RDMA services: Protocol not supported
Aug 16 19:06:30 alarm systemd[1]: Finished NFS server and services.

Most probably the issue is that the drive you’re trying to share is formatted as exFAT. A general rule of thumb is to use ext4 on a Linux system, except if you actually have a use-case that works better with something else. With ext4 you can achieve the best read/write performance and a high degree of reliability. My experience with NTFS and exFAT is slow read/write operations, and high CPU usage on intensive writing.

Format it to ext4

Just back up the files on your drive, format it to ext4, and restore the files. Your NFS share will now work!


See also