数据库服务器(PC SERVER DELL 6850)发生故障,无法修复,将全部数据迁移到一台新的服务器(PC SERVERHP DL380)上,迁移的时候,因为光纤资源的问题,都是采用单个HBA卡工作的方式(两台机器分别使用以前的两根光纤线).数据迁移完成后,数据库在新的服务器上成功启动.但是,当把另外一个HBA加入到新的服务器上时遇到了问题,本文详细描述了如何解决HBA卡无法顺利加入到新服务器环境的问题的过程和方法.
[@more@][root@dmis qlafc-linux-8.02.23-3-install]# vgs
/dev/sdg: read failed after 0 of 4096 at 0: Input/output error
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 5 0 wz--n- 136.56G 45.75G
datavg 1 1 0 wzx-n- 600.00G 1020.00M
vgs时显示I/O有I/O ERROR 的问题.
[root@dmis qlafc-linux-8.02.23-3-install]# ./qlinstall
#*********************************************************#
# SANsurfer Driver Installer for Linux #
# Installer Version: 1.01.00pre22 #
#*********************************************************#
Kernel version: 2.6.18-128.el5
Distribution: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Found following QLogic Adapter in the system
1. ISP2432
Installation will begin for following driver
1. qla2xxx version: v8.02.23
Module qla2xxx is in use, installer can not proceed.
Try unloading the module manually using "modprobe -rv qla2xxx"
and restart the installation.
[root@dmis qlafc-linux-8.02.23-3-install]# modprobe -rv qla2xxx
FATAL: Module qla2xxx is in use.
重新安装HBA的驱动(QLOGIC QLE2460驱动)时,报'Module qla2xxx is in use',无法进行重新安装.
找到一个一篇关于:删除和安装HBA卡的文章,文章的内容如下:
关键字: 删除和装载模块-hba卡
假如rac节点上某一台服务器执行fdisk -l命令看不到共享磁盘的话,可以通过执行如下命令:
# rmmod qla2400
# rmmod qla2322
# rmmod qla2xxx
# modprobe qla2400
这样就可以看到共享磁盘了。
注释1:
Linux命令:rmmod
功能说明:删除模块。
语 法:rmmod [-as][模块名称...]
补充说明:执行rmmod指令,可删除不需要的模块。Linux操作系统的核心具有模块化的特性,
应此在编译核心时,务须把全部的功能都放入核心。你可以将这些功能编译成一个
个单独的模块,待有需要时再分别载入它们。
参 数:
-a 删除所有目前不需要的模块。
-s 把信息输出至syslog常驻服务,而非终端机界面。
注释2:
Linux命令:modprobe
功能说明:自动处理可载入模块。
语 法:modprobe [-acdlrtvV][--help][模块文件][符号名称 = 符号值]
补充说明:modprobe可载入指定的个别模块,或是载入一组相依的模块。modprobe会根据depmod
所产生的相依关系,决定要载入哪些模块。若在载入过程中发生错误,在modprobe会卸
载整组的模块。
参 数:
-a或--all 载入全部的模块。
-c或--show-conf 显示所有模块的设置信息。
-d或--debug 使用排错模式。
-l或--list 显示可用的模块。
-r或--remove 模块闲置不用时,即自动卸载模块。
-t或--type 指定模块类型。
-v或--verbose 执行时显示详细的信息。
-V或--version 显示版本信息。
-help 显示帮助。
源文档 <http://wanglihu.javaeye.com/blog/385975>
[root@dmis qlafc-linux-8.02.23-3-install]# powermt remove dev=all
Warning: license for CLARiiON storage system support is missing or expired.
删除所有POWERPATH 管理的设备
[root@dmis qlafc-linux-8.02.23-3-install]# powermt display dev=all
Device(s) not found.
POWERPATH 下已经没有了设备
[root@dmis qlafc-linux-8.02.23-3-install]# rmmod qla2xxx
ERROR: Module qla2xxx is in use
根据上面文章的内容,尝试删除 qla2xxx module,结果还是报'in use'的错误.
[root@dmis qlafc-linux-8.02.23-3-install]# ./qlinstall
#*********************************************************#
# SANsurfer Driver Installer for Linux #
# Installer Version: 1.01.00pre22 #
#*********************************************************#
Kernel version: 2.6.18-128.el5
Distribution: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Found following QLogic Adapter in the system
1. ISP2432
Installation will begin for following driver
1. qla2xxx version: v8.02.23
Module qla2xxx is in use, installer can not proceed.
Try unloading the module manually using "modprobe -rv qla2xxx"
and restart the installation.
删除了POWERPATH的设备后,再次尝试安装QLOGIC的驱动,结果还是报'in use',不过提示了使用'modprobe -rv qla2xxx'删除模块
[root@dmis qlafc-linux-8.02.23-3-install]# modprobe -rv qla2xxx
FATAL: Module qla2xxx is in use.
执行modprobe -rv qla2xxx仍然报 in use的错误
[root@dmis qlafc-linux-8.02.23-3-install]# rmmod qla2xxx
ERROR: Module qla2xxx is in use
删除module仍然失败.
[root@dmis qlafc-linux-8.02.23-3-install]# cat /etc/modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias eth2 bnx2
alias eth3 bnx2
alias scsi_hostadapter cciss
alias scsi_hostadapter1 ata_piix
###BEGINPP
include /etc/modprobe.conf.pp
###ENDPP
alias scsi_hostadapter2 qla2xxx
查看 modprobe.conf文件,qla2xxx模块仍然存在,无法进行清除.
[root@dmis scsi]# ls
device_info scsi sg
[root@dmis scsi]# ls -lt
total 0
-r--r--r-- 1 root root 0 Jul 2 16:48 device_info
-r--r--r-- 1 root root 0 Jul 2 16:48 scsi
dr-xr-xr-x 2 root root 0 Jul 2 16:48 sg
但在/proc/scsi目录下因为删除了POWERPATH的设备,qla2xxx目录已经不存在了.
[root@dmis scsi]# rpm -aq|grep EMC
EMCpower.LINUX-5.1.2.00.00-021
[root@dmis scsi]# rpm -e EMCpower.LINUX-5.1.2.00.00-021
[root@dmis scsi]# rpm -aq|grep power
gnome-power-manager-2.16.0-10.el5
上面卸载了EMC 的POWERPATH 软件.
[root@dmis scsi]# ps -ef|grep qla
root 755 103 0 16:19 ? 00:00:00 [qla2xxx_0_dpc]
root 760 103 0 16:19 ? 00:00:00 [qla2xxx_1_dpc]
root 7483 5539 0 16:49 pts/1 00:00:00 grep qla
[root@dmis scsi]# kill -9 755
[root@dmis scsi]# kill -9 760
查找qla进程,并且使用KILL命令,杀掉进程.
[root@dmis scsi]# modprobe -rv qla2xxx
rmmod /lib/modules/2.6.18-128.el5/kernel/drivers/scsi/qla2xxx/qla2xxx.ko
rmmod /lib/modules/2.6.18-128.el5/kernel/drivers/scsi/scsi_transport_fc.ko
qla进程被kill后,使用modprobe -rv qla2xxx命令,就执行成功了.
./qlinstall
#*********************************************************#
# SANsurfer Driver Installer for Linux #
# Installer Version: 1.01.00pre22 #
#*********************************************************#
Kernel version: 2.6.18-128.el5
Distribution: Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Found following QLogic Adapter in the system
1. ISP2432
Installation will begin for following driver
1. qla2xxx version: v8.02.23
Unloading any loaded drivers
Installing Driver...
Preparing... ##################################################
qla2xxx ##################################################
Installing the qlinstall-autoload script in /etc/init.d/
#*********************************************************#
# INSTALLATION SUCCESSFUL!! #
# SANsurfer Driver installation for Linux completed #
#*********************************************************#
再次安装QLOGIC的HBA驱动,安装成功了
[root@dmis qlafc-linux-8.02.23-3-install]# cd ..
[root@dmis setup]# ls
10201_database_linux_x86_64.cpio EMCpower.LINUX-5.1.2.00.00-021.rhel5.x86_64.rpm p6810189_10204_Linux-x86-64.zip README.html
database lost+found qlafc-linux-8.02.23-3-install
Disk1 oracle_10203.tar qlafc-linux-8.02.23-3-install.tgz
[root@dmis setup]# rpm -Uvh EMCpower.LINUX-5.1.2.00.00-021.rhel5.x86_64.rpm
Preparing... ########################################### [100%]
1:EMCpower.LINUX ########################################### [100%]
All trademarks used herein are the property of their respective owners.
NOTE:License registration is not required to manage the CLARiiON AX series array.
再次安装EMC POWERPATH 软件,安装成功.
[root@dmis setup]# cd /proc/scsi
[root@dmis scsi]# ls
device_info qla2xxx scsi sg
[root@dmis scsi]# cd qla2xxx
[root@dmis qla2xxx]# ls
0 1
通过目录查看,发现目录内容正确,存在/proc/scsi/qla2xxx目录,并存在子文件: 0,1
#reboot
[root@dmis qla2xxx]# vgs
/dev/sdg: read failed after 0 of 4096 at 0: Input/output error
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 5 0 wz--n- 136.56G 45.75G
datavg 1 1 0 wzx-n- 600.00G 1020.00M
重新启动OS,后发现问题依然存在.
[root@dmis ~]# powermt
Usage:
powermt
powermt check [force] [hba=
powermt check_registration
powermt config
powermt disable hba=
powermt display nonvirtual {dev=
[width=<#col>]
powermt display [ports] [dev=
[width=<#col>]
powermt display hba_mode
powermt display latency [dev=
[width=<#col>]
powermt display options
powermt display paths [every=<#seconds>] [width=<#col>]
powermt display port_mode
powermt display unmanaged
powermt enable hba=
powermt load [file=
powermt manage {dev=
powermt release
powermt remove [force] hba=
powermt restore [hba=
powermt save [file=
powermt set mode=active|standby [hba=
powermt set path_latency_monitor=on|off
powermt set path_latency_threshold=
powermt set periodic_autorestore=on|off
powermt set policy={ad|bf|co|lb|li|nr|re|rr|so|si} [dev=
powermt set port_disable={true|false} dev=
powermt set priority=
powermt unmanage {dev=
powermt update lun_names
powermt version [format={verbose|legacy}]
Powermt config
Powermt enable hba=1
Powermt restore dev=all
Powermt check
尝试了上面多个powermt的命令,问题依然存在.
后来咨询了IBM公司的技术工程师,告知这个与存储管理端有关,与OS端没有关系,因为在OS层,首先应该可以看到一个盘的4个路径,即可以看到4个盘(4个相同大小的设备),而目前的情况是只能看到2个相同大小的设备(/dev/sda,/dev/sdb).
# fdisk -l
Disk /dev/sda: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 17844 143227507+ 8e Linux LVM
Disk /dev/emcpowera: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
IBM公司的技术工程师给出的答复是,在EMC存储的管理软件里,将stroage group中的host删除(移出),然后再把host重新加入到storage group中,这样做后,OS层将可以认到4个路径的盘(设备);
为什么呢?
在做这个调整前,存储管理软件里可以看到host下已经有4个光纤链路,说明在存储交换机层的zone是没有问题的,光纤链路也没有问题,4条路径是通的.通过host的移出和移入,存储管理软件实现了一次新的HBA卡的注册工作,这样两个HBA卡都投入了使用.
关闭OS(shutdown -h now),然后进行上面的调整,然后启动OS,果然可以认到了4个设备,问题得到解决.
#fdisk -l
Disk /dev/sda: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda doesn't contain a valid partition table
Disk /dev/sdb: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdd doesn't contain a valid partition table
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/cciss/c0d0p1 * 1 13 104391 83 Linux
/dev/cciss/c0d0p2 14 17844 143227507+ 8e Linux LVM
Disk /dev/emcpowera: 644.2 GB, 644245094400 bytes
255 heads, 63 sectors/track, 78325 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
[root@dmis ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VolGroup00 1 5 0 wz--n- 136.56G 45.75G
datavg 1 1 0 wz--n- 600.00G 1020.00M