gentoo:the_steps_i_took_to_solve_the_problem

문제 해결을 위해서 내가 취한 조치와 결과

나타난 증상

시스템 시작시 NFS 마운트가 올라오지 않음

/var/log/syslog

May  8 20:39:49 m5pro-gentoo kernel: r8169 0000:01:00.0 enp1s0: Link is Up - 1Gbps/Full - flow control rx/tx
May  8 20:39:49 m5pro-gentoo dhcpcd[1918]: DUID 00:01:00:01:2d:ce:21:05:84:47:09:36:d3:4e
May  8 20:39:49 m5pro-gentoo dhcpcd[1918]: enp1s0: IAID 09:36:d3:4e
May  8 20:39:49 m5pro-gentoo dhcpcd[1918]: enp1s0: adding address fe80::f62a:a5a9:5c02:ffb9
May  8 20:39:50 m5pro-gentoo ifplugd(enp1s0)[2134]: Link beat detected.
May  8 20:39:50 m5pro-gentoo /etc/init.d/netmount[2293]: WARNING: netmount will start when net.enp1s0 has started
May  8 20:39:50 m5pro-gentoo dhcpcd[1918]: enp1s0: soliciting an IPv6 router
May  8 20:39:51 m5pro-gentoo ifplugd(enp1s0)[2134]: Executing '/etc/ifplugd/ifplugd.action enp1s0 up'.
May  8 20:39:51 m5pro-gentoo dhcpcd[2477]: sending commands to dhcpcd process
May  8 20:39:51 m5pro-gentoo dhcpcd[1918]: control command: dhcpcd -m 2 enp1s0
May  8 20:39:51 m5pro-gentoo ifplugd(enp1s0)[2134]: client: sending commands to dhcpcd process
May  8 20:39:51 m5pro-gentoo dhcpcd[1918]: enp1s0: soliciting a DHCP lease
May  8 20:39:51 m5pro-gentoo kernel: Key type dns_resolver registered
May  8 20:39:51 m5pro-gentoo dhcpcd[1918]: enp1s0: offered 192.168.0.48 from 192.168.0.1
May  8 20:39:51 m5pro-gentoo dhcpcd[1918]: enp1s0: probing address 192.168.0.48/24
May  8 20:39:52 m5pro-gentoo kernel: NFS: Registering the id_resolver key type
May  8 20:39:52 m5pro-gentoo kernel: Key type id_resolver registered
May  8 20:39:52 m5pro-gentoo kernel: Key type id_legacy registered
May  8 20:39:52 m5pro-gentoo ifplugd(enp1s0)[2134]: client: mount.nfs4: Network is unreachable for n40l:/mnt/1st-bay/Gentoo on /Gentoo
May  8 20:39:52 m5pro-gentoo ifplugd(enp1s0)[2134]: Program executed successfully.
May  8 20:39:56 m5pro-gentoo dhcpcd[1918]: enp1s0: leased 192.168.0.48 for 7200 seconds
May  8 20:39:56 m5pro-gentoo dhcpcd[1918]: enp1s0: adding route to 192.168.0.0/24
May  8 20:39:56 m5pro-gentoo dhcpcd[1918]: enp1s0: adding default route via 192.168.0.1

내가 생각한 원인

net.enp1s0의 준비가 완료되기 전에 nfs mount를 시도해서 실패하는 것으로 파악

취한 조치

/etc/conf.d/netmount

# 기존에 있던 설정
rc_need="net"

# 문제 해결을 위해서 추가한 부분
rc_need="net.enp1s0"
rc_need="dhcpcd"

결과

다음 시스템 시작시 확인

여기저기 찾아보다가 이런 글을 읽어보게 되었음.

–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)

그래서 OpenRC 기본기능으로 해보기로 하고 Dhcpcd 패키지를 다음과 같이 부팅시 제외

rc-update del dhcpcd default
그리고 수정한 설정들을 원래 상태도 되돌림.

결과는 아래 로그와 같음

rc default logging started at Mon May 20 06:35:01 2024

 * Starting sysklogd ...
 [ ok ]
 * Starting cronie ...
 [ ok ]
 * Starting dbus ...
 [ ok ]
 * Bringing up interface enp1s0
 *   Caching network module dependencies
 *   dhcp ...
 *     Running dhcpcd ...
dhcpcd-10.0.6 starting
DUID 00:01:00:01:2d:dc:fb:21:84:47:09:36:d3:4e
enp1s0: waiting for carrier
enp1s0: carrier acquired
enp1s0: IAID 09:36:d3:4e
enp1s0: adding address fe80::7b56:4667:f15:89c3
enp1s0: soliciting an IPv6 router
enp1s0: rebinding lease of 192.168.0.48
enp1s0: probing address 192.168.0.48/24
enp1s0: leased 192.168.0.48 for 7200 seconds
enp1s0: adding route to 192.168.0.0/24
enp1s0: adding default route via 192.168.0.1
 [ ok ]
 *     received address 192.168.0.48/24
 [ ok ]
 * Starting rpcbind ...
 [ ok ]
 * Starting NFS statd ...
 [ ok ]
 * Setting up RPC pipefs ...
 [ ok ]
 * Starting idmapd ...
 [ ok ]
 * Starting NFS sm-notify ...
 [ ok ]
 * Mounting network filesystems ...
 [ ok ]
 * Starting elogind ...
 [ ok ]
 * Starting display-manager ...
 [ ok ]
 * Starting sshd ...
 [ ok ]
 * Starting local ...
 [ ok ]

rc default logging stopped at Mon May 20 06:35:16 2024

└─/Gentoo                     n40l:/mnt/1st-bay/Gentoo nfs4        rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.0.48,local_lock=none,addr=192.168.0.40

  • gentoo/the_steps_i_took_to_solve_the_problem.txt
  • 마지막으로 수정됨: 2024/05/19 12:51
  • 저자 baecy