歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> centos安裝raid卡驅動總結

centos安裝raid卡驅動總結

日期:2017/3/3 16:27:09   编辑:關於Linux

有些時候centos Linux內核不存在raid卡的驅動,以前只能用軟盤加載驅動,其實是還有其它方法的,只要找到官方相應的驅動,現在Raid卡的品牌很多,但是大部分獨立raid卡為highpoint,3ware,adapter,lsi,promise等還有些是集成在主板上的,如果要制作帶驅動的iso鏡像光盤比較費時間費精力,要很熟悉ISO的目錄結構,要把initrd.img文件加入驅動程序進去,然後封裝起來,接下來介紹兩種比較好的方法。

硬件型號為lsi 1064e集成raid卡

安裝系統centos5.8 Linux

首先先介紹第一種方法:

第一種方法就是采用linux dd來加載驅動,首先准備一個讀卡器和sd卡或者u盤

這裡是打開u盤所看到的img文件

1g的U盤已經變成1.44m了。

加載光盤到boot: linux dd加載驅動

正在加載usb-storage driver驅動。

詢問是否要加載驅動選擇yes

選擇sda設備usb設備都是被識別為scsi設備

是否要加載/dev/sda設備選擇ok

是否要加載額外的驅動否

第二中方法:

利用linux nostorage

首先把u盤分區

[root@zh888 ~]# fdisk -l//查看所有分區和硬盤

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0007103c

Device Boot Start End Blocks Id System

/dev/sda1 * 1 66 524288 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 66 1371 10485760 83 Linux

/dev/sda3 1371 1632 2097152 82 Linux swap / Solaris

Disk /dev/sdb: 1000 MB, 1000341504 bytes//這是第二塊u盤的信息為1g

31 heads, 62 sectors/track, 1016 cylinders

Units = cylinders of 1922 * 512 = 984064 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x6f20736b

Device Boot Start End Blocks Id System

[root@zh888 ~]# fdisk /dev/sdb//格式化第二塊scsi設備u盤

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

switch off the mode (command 'c') and change display units to

sectors (command 'u').

Command (m for help): p//查看分區

Disk /dev/sdb: 1000 MB, 1000341504 bytes

31 heads, 62 sectors/track, 1016 cylinders

Units = cylinders of 1922 * 512 = 984064 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x6f20736b

Device Boot Start End Blocks Id System

Command (m for help): n//創建新分區new

Command action

e extended

p primary partition (1-4)

p//選擇主分區類型

Partition number (1-4): 1//第一個主分區

First cylinder (1-1016, default 1): 回車

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-1016, default 1016): 回車

Using default value 1016

Command (m for help): w//最重要的參數write寫入保存退出

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@zh888 ~]# fdisk -l//接著查看分區

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0007103c

Device Boot Start End Blocks Id System

/dev/sda1 * 1 66 524288 83 Linux

Partition 1 does not end on cylinder boundary.

/dev/sda2 66 1371 10485760 83 Linux

/dev/sda3 1371 1632 2097152 82 Linux swap / Solaris

Disk /dev/sdb: 1000 MB, 1000341504 bytes

31 heads, 62 sectors/track, 1016 cylinders

Units = cylinders of 1922 * 512 = 984064 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x6f20736b

Device Boot Start End Blocks Id System

/dev/sdb1 1 1016 976345 83 Linux//這裡是查看sdb1分區但是沒創建文件系統

[root@zh888 ~]# mkfs.vfat /dev/sdb1//格式化創建文件系統為vfat(fat32)格式,這個一定要在linux操作,在windows下格式化fat或者fat32都是無法識別的,會出現問題如下:

輸入linux nostorage選擇add device增加設備

選擇usb mass storage driver for linux加載

出現選擇設備驅動

以上按f2選擇sdb設備也就是u盤設備

選擇/dev/sdb1設備

選擇你需要的lsi驅動程序按ok

加載lsi megasr driver 15.00多出來的驅動。

最後就可以識別到lsi raid卡了,還可以結合linux ks=http://ip/ks.cfg dd無人值守安裝系統。

本文出自 “有志者事竟成!” 博客,請務必保留此出處http://zh888.blog.51cto.com/1684752/867934

Copyright © Linux教程網 All Rights Reserved