Talk:Nfs-utils

From Gentoo Wiki
(Redirected from Talk:NFS)
Jump to:navigation Jump to:search
Note
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using ~~~~:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 18:14, 13 January 2025 (UTC)
:: Your reply ~~~~

systemd

Talk status
This discussion is done.

Hi all, I found very useful this wiki, but it is not covering the case of a systemd based gentoo system:

  • nfsd prerequisite services: openrc manages all the nfsd prerequisites correctly, under systemd instead the services have to be enabled explicitly;
  • nfsd options: under openrc the config file /etc/conf.d/nfs is correctly managed by openrc, under systemd it is not, I had to alter the corresponding systemd service to have similar behaviour.

I realize that maybe this topic should be addressed also to the systemd experts, but it could be convenient at least to mention the differences.

The problem imho it is that the behaviour of a gentoo system is become somewhat different depending to the init system used (openrc or systemd).

Best regards

Giampiero

— The preceding comment was added by Zio-lupo (talkcontribs) 11 January 2015

Hi, I just added some instructions how to get NFS running with systemd, according to https://www.gentoo.org/support/news-items/2015-02-02-nfs-service-changes.html

Regards, Markus

— The preceding comment was added by kaindl (talkcontribs) 30 January 2017

exports.d

Talk status
This discussion is done.

24/01/2017: net-fs/nfs-utils-1.3.4: I have /etc/exports.d/ instead of /etc/exports I am not sure if they are related.. so I used the /etc/exports file cheers, BW

— The preceding comment was added by Bw (talkcontribs) 24 January 2017

See man 5 exports and http://www.portagefilelist.de/site/query/listPackageFiles/?category=net-fs&package=nfs-utils&version=1.3.4&do#result --Charles17 (talk) 14:13, 24 January 2017 (UTC)


mount.nfs4: Network is unreachable

Talk status
This discussion is still ongoing.

At the time of writing this section, the software versions involved were as following

  1. net-fs/nfs-utils-2.6.1
  2. sys-kernel/gentoo-sources-5.15.75
  3. sys-apps/openrc-0.45.s-r1


About the solutions provided,

  1. Change in /etc/rc.conf should have worked since the logs showed dhcp starting before nfs but it didn't. I may have been able to set more specific dependencies on this file based on the examples to configure specific requirements for services but didn't feelconfident enought and my attempts didn't work so I assumed that I was not doing it right.
  2. Add netwotk to the depend() section on the init script should have worked, eithwe using net or net.enp1s0 but again, that didn't work for me.
  3. Setting a fix IP did the trick for me.


I assume, based on my attempts that dhcp service was too slow to start and was not a requirement for nfs. I may do some more digging about it. But one potential problem that I see with this solution is that after updates to the related packages, the modifications on the init scripts may be lost.

--Patomas (talk) 03:37, 7 November 2022 (UTC)

After finishing the previous message, I edited back the /etc/conf.d/net and reenabled the dhcpcd service, then edited the /etc/init.d/dhcpcd file, adding net.enp1s0 to the line with localmount on the depend() section, removed the net.enp1s0 from the /etc/init.d/nfsclient rebooted and everything worked.
My next step was to put the requirements only on the /etc/init.d/nfsclient, but adding the dhcpcd and net.enp1s0 both there doesn't fix the problem. I suppose that a detection for having IP on /etc/init.d/nfsclient would solve the problem.
So, based on that last attempt, I'll modify the solution provided to reflect the finding.
--Patomas (talk) 04:04, 7 November 2022 (UTC)
Do not mix netifrc (net.*) services and dhcpcd service. They will fight for control unless specifically excluded from each other. If "net.eth0" is set to dhcp, then it starts its own copy of dhcpcd. While the dhcpcd service has another copy trying to hold control of eth0. --Grknight (talk) 14:31, 7 November 2022 (UTC)
In addition, if network is slow to start and you've fixed the services, a better suggestion is to change /etc/conf.d/nfsclient adding rc_need="net-online" (optionally configuring /etc/conf.d/net-online) to ensure that ethernet is fully ready. Or, if using a static IP, rc_need="net.eth0" or whatever service the NFS client needs. --Grknight (talk) 15:06, 7 November 2022 (UTC)
About changing /etc/conf.d/nfsclient, I added rc_need="net.enp1s0" and rc_after="net"which is my specific case and it worked but I didn't report back here. I didn't try rc_need="net-online" before, I was actually trying to find a way to test for a ping on startup and couldn't find a way.
The next step would be to add the solution to the page, should I do it or should you do it?
--Patomas (talk) 07:49, 16 November 2022 (UTC)
--AnSh (talk) I've just spent a half of a day to get to the same solution: "In addition, if network is slow to start and you've fixed the services, a better suggestion is to change /etc/conf.d/nfsclient adding rc_need="net-online" (optionally configuring /etc/conf.d/net-online) to ensure that ethernet is fully ready." The only difference was that I've added rc_need="net-online" to the nfsmount script.

Update to reflect differences between NFS v3 and v4

Talk status
This discussion is still ongoing as of 2024-12-03.

The wiki should be rewritten using, say, NFSv4 explicitly and showing what to do if v3 is needed. As it is, the two are mixed in a confusing way. I believe that the client's mount command is the main issue. It should also be clarified what is meant by the NFS server's 'virtual root'. PeterHumphrey (talk) 14:45, 3 December 2024 (UTC)

Hello PeterHumprhrey. What are the technical reasons that lead to the suggestion that it should be rewritten to NFSv4 explicitelly. Just by writing that you belive, that it leads to the nfs client's issue, that is very vague. Perhaps it would help to create a troubleshooting entry for the nfs-client that shows the mentioned nfs-client issue, a error message you might have seen. And how to resolve that issue on the nfs-client. The virtual-root, this is a directory for the NFSv4 server where all NFS shares should be in. It is directory where you bind all the NFS server shares to. You will find webpages which explain the virtual-root directory more in detail when it comes to NFS server configuration. Needle (talk) 11:40, 4 December 2024 (UTC)

Hello Needle. The problem is that the instructions in the wiki page are jumbled up, making it hard to sort out what needs to be done. I'm suggesting that they should be clarified, that's all. This could be done most easily by concentrating on one version of nfs-utils and showing where differences occur between versions. And yes, I now know the function of the virtual root, but it is not explained in the wiki page. And please don't tell me where else I could find information - I spent weeks trying to find the problem. That could have been avoided very easily with clearer instructions in the wiki page. If you need help with English, I'll be happy to oblige. --PeterHumphrey (talk) 14:42, 4 December 2024 (UTC)

Hello PeterHumpphrey. The wiki entry about nfs-utils is not meant to be copy/pasted per se. The technical reasons I have been asking you in the first place, NFSv3 vs NFSv4 is not as easy to answer. You did not give one technical reasons in your 2-nd reply. It is not about NFSv3 is old and NFSv4 is better, that is not the case here, you might research that topic for yourself. I suggested that you might add an entry to the troubleshooting section which configuration problems you have been hitting when configuring the nfs-client. I have been polite and tried directly answering the question about the virtual-root. I maybe try suggesting once again, maybe it will work this time. It would greatly help other gentoo readers and future NFS configurators, if you edited the wiki and added the errors you have been trying to solve for weeks, and which configuration finally led to the solution of the problem on the server/client side. And yes you are correct, I am not a native english speaker. I will not be replying again to this discussion. It was not my goal to get you upset, and hit you on the emotional side. My goal is pure technical side of things and that future gentoo readers do not make same mistakes and errors over and over again. Needle (talk) 15:46, 5 December 2024 (UTC)