首页 > 代码库 > linux硬盘驱动更新
linux硬盘驱动更新
- 作者:邹祁峰
- 邮箱:Qifeng.zou.job@gmail.com
- 博客:http://blog.csdn.net/qifengzou
- 日期:2015.01.16 00:33
- 转载请注明来自"祁峰"的CSDN博客
在内核未升级之前,系统能够正常启动和使用,而当升级系统内核后,系统却无法正常启动时,这可能是因为硬盘驱动不兼容造成的。现可通过进入旧系统按照以下步骤逐步排查相关原因:
#lspci -nn | grep "SAS"
#lspci -nn | grep "SCSI"
如:SAS [1000 :0078]
②、查看老内核使用的硬盘控制芯片驱动
#uname -a #注: 可以查看到当前使用的内核名
cat /lib/modules/2.6.28-16-server/modules.pcimap #注:其中2.6.28-16-server为老内核名
cat /lib/modules/2.6.28-16-server/modules.pcimap #注:其中2.6.28-16-server为老内核名
# pci module vendor device subvendor subdevice class class_mask driver_data scx200 0x0000100b 0x00000500 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 scx200 0x0000100b 0x00000510 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 scx200 0x0000100b 0x00000505 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 scx200 0x0000100b 0x00000515 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 cpqphp 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x00080400 0xffffffff 0x0 ibmphp 0x00001014 0x00000246 0x00001014 0x00000247 0x00080400 0x00000000 0x0 cpcihp_zt5550 0x00001138 0x00005550 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 shpchp 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0x00060400 0xffffffff 0x0 gx1fb 0x00001078 0x00000104 0xffffffff 0xffffffff 0x00030000 0x00ff0000 0x0 gxfb 0x0000100b 0x00000030 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 lxfb 0x00001022 0x00002081 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 cyber2000fb 0x000010ea 0x00002000 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 cyber2000fb 0x000010ea 0x00002010 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 cyber2000fb 0x000010ea 0x00005000 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
megaraid_sas 0x00001000 0x00000411 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001000 0x00000060 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001000 0x0000007c 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001000 0x00000078 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001000 0x00000079 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001000 0x00000413 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 megaraid_sas 0x00001028 0x00000015 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 advansys 0x000010cd 0x00001100 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 advansys 0x000010cd 0x00001200 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0
并根据①的过滤结果进行搜索[1000 : 0078],便可看到老内核所使用的硬盘芯片驱动名。如:megaradi_sas
③、查找硬盘控制芯片驱动对应的驱动模块文件*.ko
根据②的搜索结果查找硬盘芯片驱动对应的驱动文件*.ko
#lsmod | grep "megaraid_sas"
megaraid_sas 74148 6
scsi_mod 141236 3 sg,sd_mod,megaraid_sas
megaraid_sas 74148 6
scsi_mod 141236 3 sg,sd_mod,megaraid_sas
④、查看新内核硬盘芯片驱动是否支持当前的芯片厂商和型号
#modinfo /lib/modules/2.6.33-88-server/kernel/drivers/scsi/megaraid/megaraid_sas.ko #注: 假设新内核为2.6.33-88-server
filename: /lib/modules/2.6.33-88-server/kernel/drivers/scsi/megaraid/megaraid_sas.ko
description: LSI MegaRAID SAS Driver
author: megaraidlinux@lsi.com
version: 00.00.05.40-rh2
license: GPL
srcversion: 6369B642440E1B1D4319D71
alias: pci:v00001000d0000005Bsv*sd*bc*sc*i*
alias: pci:v00001028d00000015sv*sd*bc*sc*i*
alias: pci:v00001000d00000413sv*sd*bc*sc*i*
alias: pci:v00001000d00000071sv*sd*bc*sc*i*
alias: pci:v00001000d00000073sv*sd*bc*sc*i*
alias: pci:v00001000d00000079sv*sd*bc*sc*i*
alias: pci:v00001000d00000078sv*sd*bc*sc*i*
alias: pci:v00001000d0000007Csv*sd*bc*sc*i*
alias: pci:v00001000d00000060sv*sd*bc*sc*i*
alias: pci:v00001000d00000411sv*sd*bc*sc*i*
depends: scsi_mod
vermagic: 2.6.33-dpdk.zznode SMP mod_unload modversions
parm: poll_mode_io:Complete cmds from IO path, (default=0) (int)
parm: max_sectors:Maximum number of sectors per IO command (int)
parm: msix_disable:Disable MSI-X interrupt handling. Default: 0 (int)
filename: /lib/modules/2.6.33-88-server/kernel/drivers/scsi/megaraid/megaraid_sas.ko
description: LSI MegaRAID SAS Driver
author: megaraidlinux@lsi.com
version: 00.00.05.40-rh2
license: GPL
srcversion: 6369B642440E1B1D4319D71
alias: pci:v00001000d0000005Bsv*sd*bc*sc*i*
alias: pci:v00001028d00000015sv*sd*bc*sc*i*
alias: pci:v00001000d00000413sv*sd*bc*sc*i*
alias: pci:v00001000d00000071sv*sd*bc*sc*i*
alias: pci:v00001000d00000073sv*sd*bc*sc*i*
alias: pci:v00001000d00000079sv*sd*bc*sc*i*
alias: pci:v00001000d00000078sv*sd*bc*sc*i*
alias: pci:v00001000d0000007Csv*sd*bc*sc*i*
alias: pci:v00001000d00000060sv*sd*bc*sc*i*
alias: pci:v00001000d00000411sv*sd*bc*sc*i*
depends: scsi_mod
vermagic: 2.6.33-dpdk.zznode SMP mod_unload modversions
parm: poll_mode_io:Complete cmds from IO path, (default=0) (int)
parm: max_sectors:Maximum number of sectors per IO command (int)
parm: msix_disable:Disable MSI-X interrupt handling. Default: 0 (int)
如果显示的结果中,包含了该硬盘控制芯片厂商和信号[1000 :0078],则说明该mod支持当前硬盘;如果不包含,则说明新内核硬盘芯片控制驱动不支持当前驱动,此时需要下载合适的驱动源码放入新内核进行编译。
⑤、下载源代码的路径
ftp://ftp.redhat.org/redhat/linux/enterprise/6Server/en/os/SRPMS/
将源码加入内核进行编译的方法待续!
linux硬盘驱动更新
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。