解决HP ProLiant DL380 G5的安装与启动CentOS7时不能识别raid硬盘问题

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/sinat_32582203/article/details/95178875

最近去机房给一台HP DL380G5重装操作系统时,发现CentOS7无法识别到硬盘,这台服务器做的raid1,有理由怀疑新系统无法支持老机器的raid卡,查了些资料在此做个记录。

一、无法识别的原因

参看: https://www.kernel.org/doc/Documentation/scsi/hpsa.txt

Supported devices:
------------------

Smart Array P212
Smart Array P410
Smart Array P410i
Smart Array P411
Smart Array P812
Smart Array P712m
Smart Array P711m
StorageWorks P1210m

Additionally, older Smart Arrays may work with the hpsa driver if the kernel
boot parameter "hpsa_allow_any=1" is specified, however these are not tested
nor supported by HP with this driver.  For older Smart Arrays, the cciss
driver should still be used.

The "hpsa_simple_mode=1" boot parameter may be used to prevent the driver from putting the controller into "performant" mode.  The difference is that with simple mode, each command completion requires an interrupt, while with "performant mode"(the default, and ordinarily better performing) it is possible to have multiple command completions indicated by a single interrupt.

我们服务器的阵列卡型号为E200,不受支持。文档中也给出了解决办法,即启动参数加上”hpsa_allow_any=1″,最好再加上”hpsa_simple_mode=1″。

二、具体解决办法

参看: https://tears.io/2016/01/03/installing-centos7-on-an-hp-g5-dl380/

1、安装时

安装界面选中“Install Centos 7”,按Tab键添加启动参数,键入空格+“hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1”,回车进入安装过程。

2、第一次启动

在grub界面按e进入编辑模式,在倒数第二行同样添加参数” hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1 “,按ctrl+x保存并引导系统,如图:

grub界面

添加hpsa参数

3、永久生效

两种方法,一种是编辑 /etc/default/grub,添加参数如下:

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1"
GRUB_DISABLE_RECOVERY="true"

然后是运行” grub2-mkconfig -o /boot/grub2/grub.cfg “并重启服务器。

一种是编辑 /boot/grub2/grub.cfg ,在第100行添加 “hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1” ,等同于第一次启动时编辑grub的操作:

### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricte
d $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-72958a75-1ac7-4cc8-be70-40fb90998d17' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod xfs
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --
hint='hd0,msdos1'  d3d4a871-2cf4-4488-bbb6-3988ab56af37
        else
          search --no-floppy --fs-uuid --set=root d3d4a871-2cf4-4488-bbb6-3988ab56af37
        fi
        linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv
=centos/swap rhgb quiet LANG=zh_CN.UTF-8 hpsa.hpsa_simple_mode=1 hpsa.hpsa_allow_any=1
        initrd16 /initramfs-3.10.0-957.el7.x86_64.img
}

重启服务器生效。

展开阅读全文

没有更多推荐了,返回首页