I have a nfs exported filesystem but after each reboot I have to restart the NFS server twice to make it actually export the filesystem.
First restart always fails with:
Shutting down kernel based NFS server: nfsd statd mountd idmapd done
Starting kernel based NFS server: idmapdexportfs: Warning: /home/teradisk/Share does not support NFS export.
mountd statd nfsd sm-notify done
I’m going to create a custom service that will restart the NFS server twice upon bootup, but I don’t like this solution. Therefore anyone got any idea what to do with this?
Lot of questions here (only to make clear that we talk the same language):
. which openSUSE (it may not matter much, but it is always nice to know for all who participate here)?
. did you install nfs-kernel-server and yast-nfs-server?
. did you configure the export and start the server using YaST?
. when you did otherwise please explain how.
And to be sure, it only exports correct afterr the third start?
Yes, I did install everything, the export actually works, but not by itself (yes, nfsserver is set to autostart and yes it is running after boot) and not after one NFS server restart (needs two).
I’m not sure how I configured the server initially, I think I configured it through Yast but added the export manually.
Thanks for all the info. My opinion is that editing /etc/exports manualy (when done properly ) shouldn’t be a problem.
Now I am starting wild guesses. The fact that in the end it functions means to me that your export is correct. The fact that it only works after the third trial leads me to the idea of a timing problem. When that is correct, it could work at your first restart when you wait a bit longer. Did you ever test/experience this?
I’ve got exactly the same problem.
After a reboot (to runlevel 5) the client cannot mount the filesystem (permission denied).
Even if you wait more than an hour.
Nor a minute : adding a “sleep 60” before “/usr/sbin/exportfs -r” in /etc/init.d/nfsserver don’t help.
After one “exportfs -r” everythings works correctly despite the message :
exportfs -r
exportfs: Warning: /export/home/share does not support NFS export.
Like you can see, there’s “no_subtree_check” instead of “subtree_check” , change that and see if it starts normally.
How did you configure the NFS server? If not done so already, configure it through Yast - Network Services - NFS server. If you don’t see that item, install “yast2-nfs-server”, restart Yast and it will be there.
Like you can see, there’s “no_subtree_check” instead of “subtree_check” , change that and see if it starts normally.
I need subtree_check options. /export/home is the filesystem. /export/home/share is the directory i want to export. And there is things in /export/home i don’t want to export (despite the name /export). But i still try (without the correction in /etc/init.d/nfsserver above) and the problem stay the same.
How did you configure the NFS server?
Manually.
If not done so already, configure it through Yast - Network Services - NFS server. If you don’t see that item, install “yast2-nfs-server”, restart Yast and it will be there.
I install yast2-nfs-server and reconfigured the nfs server using yast. Reboot → Same problem (without the correction in /etc/init.d/nfsserver above).
Ok, I know that it’s been a while since this problem was reported, but still I created an account because I had the same issue and I want to help others to resolve it. (even in my very stupid case)
My problem was that once NFS setup was complete at my server, when I reboot the machine, NFS services started ok but without be able to connect from the clients. But if I run the “exportfs -a” and then tried to mount the shared directory on the clients, worked perfect.
So, I did a little google research and found out that /etc/exports it’s only a “read” file to /var/lib/nfs/etab. So, when you run “exportfs -a” the content of /etc/exports really goes to /var/lib/nfs/etab.-
I reboot my server and read the /var/lib/nfs/etab file, it was empty. When I run the exportfs -a and lookted again, it was ok with all the info of /etc/exports.-
Then, a colleague see domething that I just overlook. He run a “systemctl status nfs” and in the bottom he reads “Jul 19 16:53:01 xxxxx.cl exportfs[1083]: exportfs: Failed to resolve xxxxx.cl”…
O.o…
And that’s all. We edited “/etc"hosts” file to add the clients and after that is working perfect.
Welcome to the forums econtardo. It is nice that you wanted to help others, but you’re responding to a very old thread (and systemd wasn’t in use back then). Much can change over the years. For this reason, an reviewed how to is probably the best option in circumstances like these. So, please do so if you feel you have information of value to others.