When I tried to share a local directory as NFS share on a NFS server I ran into the following unexpected error:
root@nfsserver:~# exportfs -a
exportfs: 192.168.5.2:/backup: Function not implemented
A hint found in the OpenSUSE forums pointed to a potential Kernel module issue, and this really seemed to be the case - there was no nfs module loaded:
root@nfsserver:~# lsmod | grep nfs
Did someone uninstall the NFS server on this machine?
root@nfsserver:~# dpkg -l|grep nfs
ii libnfsidmap2:amd64 0.25-6 amd64 NFS idmapping library
ii nfs-common 1:1.3.4-6 amd64 NFS support files common to client and server
ii nfs-kernel-server 1:1.3.4-6 amd64 support for NFS kernel server
Nope, this still seemed to be OK...
Then I came across another hint in the Debian forums, that the NFS server was not started automatically after a system boot. And that actually was what happened in this case, too: The nfs-kernel-server.service was not started! Starting it:
root@nfsserver:~# systemctl start nfs-kernel-server
root@nfsserver:~# systemctl status nfs-kernel-server
- nfs-server.service - NFS server and services
Loaded: loaded (/lib/systemd/system/nfs-server.service; disabled; vendor preset: enabled)
Active: active (exited) since Wed 2024-08-21 15:20:59 CEST; 2s ago
Process: 3914413 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 3914414 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
Main PID: 3914414 (code=exited, status=0/SUCCESS)
CPU: 7ms
Aug 21 15:20:58 irczsrvp07 systemd[1]: Starting NFS server and services...
Aug 21 15:20:59 irczsrvp07 systemd[1]: Finished NFS server and services.
By starting the NFS Server, this loads the nfs Kernel module:
root@nfsserver:~# lsmod|grep nfs
nfsd 602112 11
auth_rpcgss 155648 1 nfsd
nfs_acl 16384 1 nfsd
lockd 126976 1 nfsd
grace 16384 2 nfsd,lockd
sunrpc 675840 18 nfsd,auth_rpcgss,lockd,nfs_acl
And now, of course, the exportfs command works:
root@nfsserver:~# exportfs -a
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Database Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Office OpenSearch PGSQL PHP Perl Personal PostgreSQL Postgres PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMWare VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Zoneminder