我有两台 CentOS5 服务器,内核版本为 3.4.52,配有华为 e353 usb 3g 调制解调器。当我将调制解调器插入服务器时,usb_modeswitch 运行,我可以ifconfig -a
在正常工作的服务器上使用命令将调制解调器视为以太网设备。但其他服务器无法正常工作。插入调制解调器设备后,我看不到任何以太网。
- 所有服务器都有相同版本的
usb_modeswitch
rpm。
跑步前usb_modeswitch
working properly not working properly
# lsusb | grep 12d1 # lsusb | grep 12d1
Bus 001 Device 005: ID 12d1:1f01 Bus 001 Device 005: ID 12d1:1f01`
跑步后usb_modeswitch
working properly not working properly
# lsusb | grep 12d1 # lsusb | grep 12d1
Bus 001 Device 005: ID 12d1:14db Bus 001 Device 005: ID 12d1:14db
# rpm -qa | grep modesw # rpm -qa | grep modesw
usb_modeswitch-data-20130610-1.lbr usb_modeswitch-data-20130610-1.lbr
usb_modeswitch-1.2.6-2 usb_modeswitch-1.2.6-2`
- 用 diff 比较了两个服务器的 /etc/udev 目录,但没有任何区别
关于服务器无法正常工作,有一件有趣的事情。在插入 USB 3G 调制解调器的情况下重新启动服务器后,调制解调器正常工作,我可以使用命令将其视为以太网设备ifconfig -a
。因此,我认为如果我可以重新加载 udev,我将把调制解调器视为以太网设备,因此我运行以下命令:
/sbin/udevcontrol reload_rules
/sbin/start_udev
但这并没有解决问题。而且我还认为这两台服务器可能使用了不同的内核参数。所以我比较了sysctl -a
每台服务器上的输出。
# diff config_workingProperly config_notWorkingProperly -y
CONFIG_TREE_PREEMPT_RCU=y | CONFIG_TREE_RCU=y
CONFIG_PREEMPT_RCU=y | # CONFIG_PREEMPT_RCU is not set
# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set | CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
# CONFIG_INLINE_READ_UNLOCK is not set | CONFIG_INLINE_READ_UNLOCK=y
# CONFIG_INLINE_READ_UNLOCK_IRQ is not set | CONFIG_INLINE_READ_UNLOCK_IRQ=y
# CONFIG_INLINE_WRITE_UNLOCK is not set | CONFIG_INLINE_WRITE_UNLOCK=y
# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set | CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
# CONFIG_PREEMPT_NONE is not set | CONFIG_PREEMPT_NONE=y
CONFIG_PREEMPT=y | # CONFIG_PREEMPT is not set
# CONFIG_BLK_DEV_FD is not set | CONFIG_BLK_DEV_FD=m
# CONFIG_IDE_GD is not set | CONFIG_IDE_GD=m
# CONFIG_BLK_DEV_IDECD is not set | CONFIG_IDE_GD_ATA=y
# CONFIG_BLK_DEV_SR_VENDOR is not set | CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_JFS_FS=m | # CONFIG_JFS_FS is not set
# CONFIG_CUSE is not set | CONFIG_CUSE=y
CONFIG_ISO9660_FS=m | CONFIG_ISO9660_FS=y
CONFIG_UDF_FS=m | CONFIG_UDF_FS=y
CONFIG_FAT_FS=m | CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=m | CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=m | CONFIG_VFAT_FS=y
CONFIG_SQUASHFS=m | CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_XATTR is not set | CONFIG_SQUASHFS_XATTR=y
# CONFIG_SQUASHFS_LZO is not set | CONFIG_SQUASHFS_LZO=y
# CONFIG_SQUASHFS_XZ is not set | CONFIG_SQUASHFS_XZ=y
CONFIG_CRC_ITU_T=m | CONFIG_CRC_ITU_T=y
# CONFIG_RCU_BOOST is not set <
CONFIG_UNINLINE_SPIN_UNLOCK=y <
CONFIG_PREEMPT_COUNT=y <
CONFIG_JFS_POSIX_ACL=y <
CONFIG_JFS_SECURITY=y <
# CONFIG_JFS_DEBUG is not set <
CONFIG_JFS_STATISTICS=y <
CONFIG_DEBUG_PREEMPT=y <
CONFIG_RCU_CPU_STALL_VERBOSE=y <
# CONFIG_PREEMPT_TRACER is not set <
> CONFIG_OPTPROBES=y
> CONFIG_IDE_ATAPI=y
> # CONFIG_IDE_GD_ATAPI is not set
> CONFIG_BLK_DEV_IDECD=m
> CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
> # CONFIG_LEDS_TRIGGER_IDE_DISK is not set
那么问题可能出在哪里?为什么另一台服务器在不重启的情况下无法将我的 3g 调制解调器识别为以太网设备?