Talk:Nfs-utils

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
Before creating a discussion or leaving a comment, please read about using talk pages. In particular, sign comments using ~~~~ and add new discussions at the bottom of the page. New discussions should be made visible with {{Talk|date = 2024-05-22}}.
== Discussion title ==

{{Talk|date = 2024-05-13}}

A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 11:29, 14 May 2024 (UTC)
:: Another reply [[User:Larry|Larry]] 12:18, 22 May 2024 (UTC)
:: Your reply ~~~~

Navigate to first:

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.