You are not logged in.

#1 2013-03-18 23:24:02

Sunday87
Member
Registered: 2013-01-17
Posts: 22

[Solved] NFS export at boot and net-auto-wired

Hello Guys,

I have a problem with my fileserver. Previously dhcp was enabled through systemctl enable dhcpd@eth0 and everything worked fine. I changed the network to be configured using net-auto-wired, because it seemed a reasonable thing to do and because it allows for a fallback-ip-address in case dhcp fails. Now the problem is that many daemons are (at boot) started before the net is up and so don't work properly, especially nfsd, because exportfs can't resolve the names of the allowed client computers.

...
Mär 18 11:32:22 bigbrain systemd[1]: Started NFS server.
Mär 18 11:32:22 bigbrain systemd[1]: Starting NFS Mount Daemon...
Mär 18 11:32:22 bigbrain systemd[1]: Starting NFSv4 ID-name mapping daemon...
Mär 18 11:32:23 bigbrain systemd[1]: Started NFSv4 ID-name mapping daemon.
Mär 18 11:32:24 bigbrain systemd[1]: Started Samba SMB/CIFS server.
Mär 18 11:32:24 bigbrain systemd[1]: Started NFS Mount Daemon.
Mär 18 11:32:28 bigbrain kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Mär 18 11:32:28 bigbrain tunnel-httpd.sh[321]: ssh: Could not resolve hostname example.com: Name or service not known
Mär 18 11:32:28 bigbrain tunnel-httpd.sh[321]: ssh: Could not resolve hostname example.com: Name or service not known
Mär 18 11:32:28 bigbrain ifplugd[318]: Link beat detected.
Mär 18 11:32:28 bigbrain ifplugd[318]: Executing '/etc/ifplugd/netcfg.action eth0 up'.
Mär 18 11:32:28 bigbrain ifplugd[318]: client: up
Mär 18 11:32:28 bigbrain ifplugd[318]: client: loading stw-wh
Mär 18 11:32:28 bigbrain ifplugd[318]: client: loading dhcp
Mär 18 11:32:28 bigbrain kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Mär 18 11:32:28 bigbrain dhcpcd[397]: version 5.6.7 starting
Mär 18 11:32:28 bigbrain kernel: NFSD: starting 90-second grace period
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-other-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-other-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-other-domain.example.com
Mär 18 11:32:28 bigbrain exportfs[354]: exportfs: Failed to resolve some-other-domain.example.com
Mär 18 11:32:28 bigbrain kernel: r8169 0000:04:00.0 eth0: link up
Mär 18 11:32:28 bigbrain kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Mär 18 11:32:28 bigbrain systemd[1]: PID file /run/httpd/httpd.pid not readable (yet?) after start.
Mär 18 11:32:29 bigbrain dhcpcd[397]: eth0: sending IPv6 Router Solicitation
Mär 18 11:32:29 bigbrain dhcpcd[397]: eth0: broadcasting for a lease
Mär 18 11:32:30 bigbrain dhcpcd[397]: eth0: offered 10.42.19.195 from 141.35.0.13
Mär 18 11:32:30 bigbrain dhcpcd[397]: eth0: acknowledged 10.42.19.195 from 141.35.0.13
Mär 18 11:32:30 bigbrain dhcpcd[397]: eth0: checking for 10.42.19.195
Mär 18 11:32:30 bigbrain ntpd_intres[341]: host name not found: 0.pool.ntp.org
Mär 18 11:32:30 bigbrain ntpd_intres[341]: host name not found: 1.pool.ntp.org
Mär 18 11:32:30 bigbrain ntpd_intres[341]: host name not found: 2.pool.ntp.org
Mär 18 11:32:32 bigbrain ntpd_intres[341]: host name not found: 0.pool.ntp.org
Mär 18 11:32:32 bigbrain ntpd_intres[341]: host name not found: 1.pool.ntp.org
Mär 18 11:32:32 bigbrain ntpd_intres[341]: host name not found: 2.pool.ntp.org
Mär 18 11:32:33 bigbrain dhcpcd[397]: eth0: sending IPv6 Router Solicitation
Mär 18 11:32:34 bigbrain dhcpcd[397]: eth0: leased 10.42.19.195 for 1800 seconds
Mär 18 11:32:35 bigbrain dhcpcd[397]: forked to background, child pid 446
Mär 18 11:32:35 bigbrain ifplugd[318]: client: :: dhcp up [done]
Mär 18 11:32:35 bigbrain ifplugd[318]: Program executed successfully.
Mär 18 11:32:36 bigbrain ntpd[336]: Listen normally on 5 eth0 10.42.19.195 UDP 123
Mär 18 11:32:36 bigbrain ntpd[336]: peers refreshed
Mär 18 11:32:36 bigbrain ntpd[336]: new interface(s) found: waking up resolver
Mär 18 11:32:37 bigbrain dhcpcd[446]: eth0: sending IPv6 Router Solicitation
Mär 18 11:32:38 bigbrain ntpd_intres[341]: DNS 0.pool.ntp.org -> 83.137.98.96
Mär 18 11:32:38 bigbrain ntpd_intres[341]: DNS 1.pool.ntp.org -> 176.31.45.66
Mär 18 11:32:38 bigbrain ntpd_intres[341]: DNS 2.pool.ntp.org -> 192.53.103.108
...

what can I do to fix this?

TIA
Sunday

Last edited by Sunday87 (2013-03-19 23:08:56)

Offline

#2 2013-03-19 23:08:39

Sunday87
Member
Registered: 2013-01-17
Posts: 22

Re: [Solved] NFS export at boot and net-auto-wired

For future reference:

net-auto-wired doesn't Wants=network.target at any time (neither when started nor when a connection is made) as does dhcpcd.service (so indeed i had the same problem already before i switched to net-auto-wired but i guess i didn't notice it). now i'm using netcfg.service which actually Wants=network.target and starts Before=network.target so everything works fine. The only thing that is missing is a fallback static ip in case the dhcp does not respond, but that is another question so i will mark this solved.

Offline

Board footer

Powered by FluxBB