ixgbe光纤网卡的驱动在默认情况下不支持第三方兼容光模块,会导致网卡驱动加载失败,插上模块的时候ifocnfig看不到对应的网卡:但是lspci可以看到网卡设备
test@test-MS-S1011:~$ lspci |grep 10G
83:00.0 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
83:00.1 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
执行dmesg |grep ixbge会发现有不支持的模块报错
解决办法:
1. 临时方案,重启会失效,可以写入开机启动里面。
root@test-MS-S1011:/home/test# rmmod ixgbe
root@test-MS-S1011:/home/test# modprobe ixgbe allow_unsupported_sfp=1
2.永久方案,修改grub
2.1在etc/default/grub文件的配置项GRUB_CMDLINE_LINUX增加" ixgbe.allow_unsupported_sfp=1"
root@test-MS-S1011:/home/test# cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="ixgbe.allow_unsupported_sfp=1"
2.2更新grub,然后reboot
root@test-MS-S1011:/home/test# grub-mkconfig -o /boot/grub/grub.cfg
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-43-generic
Found initrd image: /boot/initrd.img-5.15.0-43-generic
Found linux image: /boot/vmlinuz-5.15.0-41-generic
Found initrd image: /boot/initrd.img-5.15.0-41-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done