linux基础——修复系统bonding模块

发布时间 2023-10-17 16:12:54作者: gkhost

 

卸载模块

[root@localhost network-scripts]# modprobe -r bonding

查看模块

[root@localhost network-scripts]# lsmod | grep bonding

绑定模块

[root@localhost network-scripts]# modprobe bonding

[root@localhost network-scripts]# lsmod | grep bonding

bonding 200704 0

模块位置及依赖关系

 

查找/lib/moduels/(uname -r)/中的所有模块并建立modules.dep.bin文件,该文件记录了模块位置及依赖关系

[root@localhost network-scripts]# cd /lib/modules/$(uname -r)/

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# ls | grep dep

modules.dep

modules.dep.bin

modules.softdep

模拟删除模块位置及依赖关系

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# mkdir bak

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# mv modules.dep.bin ./bak

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# ls | grep dep

modules.dep

modules.softdep

再次加载模块失败

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# modprobe bonding

modprobe: FATAL: Module bonding not found.

生成模块依赖关系modules.dep.bin文件

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# depmod -a

重新加载模块成功

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# modprobe bonding

[root@localhost 5.4.18-200.el7.bclinux.x86_64+debug]# lsmod | grep bonding

bonding 200704 0 

 

NetworkManager服务hostname特殊字符BUG

问题1:Centos8.2、BClinux8.2启动NetworkManager网络服务,导致bond1接口无法启动,

报错:“[1588191884.1328] device (ens33): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')”;

描述:BUG描述链接: https://bugzilla.redhat.com/show_bug.cgi?id=1744427

解决办法:在CentOS 8还没有对应更新NetworkManager软件包的情况下,我们只能把系统的hostname修改为localhost,来避开这个BUG

for i in static pretty transient; do hostnamectl set-hostname localhost --$i; done

修改完成后就可以重启自动获取DHCP IP了