我有 2 个系统运行 CentOS 7,内核为 3.10.0-957.el7.x86_64。
一切运行正常,但是,我尝试将内核版本升级到 5.9.1-1.el7.elrepo.x86_64,现在我的以太网接口在启动时没有配置的 IP 地址。两台机器都发生了这种情况。
日志显示:
Oct 20 10:11:15 pdb-01a systemd: Reached target Login Prompts.
Oct 20 10:11:15 pdb-01a systemd: Started Resets System Activity Logs.
Oct 20 10:11:15 pdb-01a systemd: Started Login Service.
Oct 20 10:11:15 pdb-01a systemd: Started Authorization Manager.
Oct 20 10:11:15 pdb-01a systemd: Started NTP client/server.
Oct 20 10:11:15 pdb-01a systemd: Started Load CPU microcode update.
Oct 20 10:11:15 pdb-01a kernel: power_meter ACPI000D:00: Found ACPI power meter.
Oct 20 10:11:15 pdb-01a kernel: power_meter ACPI000D:00: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Oct 20 10:11:15 pdb-01a kernel: ixgbe 0000:d8:00.0: Multiqueue Enabled: Rx Queue count = 63, Tx Queue count = 63 XDP Queue count = 0
Oct 20 10:11:15 pdb-01a network: Bringing up loopback interface: [ OK ]
Oct 20 10:11:15 pdb-01a kernel: ixgbe 0000:d8:00.0: 31.504 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x4 link)
Oct 20 10:11:15 pdb-01a kernel: ixgbe 0000:d8:00.0: MAC: 4, PHY: 0, PBA No: H86377-006
Oct 20 10:11:15 pdb-01a kernel: ixgbe 0000:d8:00.0: a0:36:9f:28:8e:6c
Oct 20 10:11:15 pdb-01a network: Bringing up interface eth2: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Device eth2 does not seem to be present, delaying initialisation.
Oct 20 10:11:15 pdb-01a /etc/sysconfig/network-scripts/ifup-eth: Device eth2 does not seem to be present, delaying initialisation.
Oct 20 10:11:15 pdb-01a network: [FAILED]
Oct 20 10:11:15 pdb-01a kernel: ixgbe 0000:d8:00.0: Intel(R) 10 Gigabit Network Connection
Oct 20 10:11:15 pdb-01a kernel: libphy: ixgbe-mdio: probed
Oct 20 10:11:15 pdb-01a systemd: network.service: control process exited, code=exited status=1
Oct 20 10:11:15 pdb-01a systemd: Failed to start LSB: Bring up/down networking.
Oct 20 10:11:15 pdb-01a systemd: Unit network.service entered failed state.
Oct 20 10:11:15 pdb-01a systemd: network.service failed.
Oct 20 10:11:15 pdb-01a systemd: Reached target Network.
Oct 20 10:11:15 pdb-01a systemd: Starting Dynamic System Tuning Daemon...
Oct 20 10:11:15 pdb-01a systemd: Reached target Network is Online.
Oct 20 10:11:15 pdb-01a systemd: Starting System Logging Service...
Oct 20 10:11:15 pdb-01a systemd: Started Filebeat.
Oct 20 10:11:15 pdb-01a systemd: Starting OpenSSH server daemon...
Oct 20 10:11:15 pdb-01a systemd: Started System Logging Service.
Oct 20 10:11:15 pdb-01a systemd: Started OpenSSH server daemon.
Oct 20 10:11:16 pdb-01a kernel: power_meter ACPI000D:00: Found ACPI power meter.
Oct 20 10:11:16 pdb-01a kernel: power_meter ACPI000D:00: Ignoring unsafe software power cap!
Oct 20 10:11:16 pdb-01a kernel: ixgbe 0000:d8:00.1: Multiqueue Enabled: Rx Queue count = 63, Tx Queue count = 63 XDP Queue count = 0
Oct 20 10:11:16 pdb-01a kernel: ixgbe 0000:d8:00.1: 31.504 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x4 link)
Oct 20 10:11:16 pdb-01a kernel: ixgbe 0000:d8:00.1: MAC: 4, PHY: 0, PBA No: H86377-006
Oct 20 10:11:16 pdb-01a kernel: ixgbe 0000:d8:00.1: a0:36:9f:28:8e:6e
Oct 20 10:11:16 pdb-01a kernel: ixgbe 0000:d8:00.1: Intel(R) 10 Gigabit Network Connection
Oct 20 10:11:16 pdb-01a kernel: libphy: ixgbe-mdio: probed
Oct 20 10:11:17 pdb-01a systemd: Started Dynamic System Tuning Daemon.
Oct 20 10:11:17 pdb-01a systemd: Reached target Multi-User System.
Oct 20 10:11:17 pdb-01a systemd: Starting Update UTMP about System Runlevel Changes...
Oct 20 10:11:17 pdb-01a systemd: Started Stop Read-Ahead Data Collection 10s After Completed Startup.
Oct 20 10:11:17 pdb-01a systemd: Started Update UTMP about System Runlevel Changes.
Oct 20 10:11:47 pdb-01a systemd: Starting Stop Read-Ahead Data Collection...
看起来 systemd 在驱动程序初始化完成之前尝试启动网络。
系统启动后,ifup eth2
运行正常。有什么方法可以让 systemd 等待驱动程序准备就绪吗?
一切顺利,
转铁蛋白