使用CentOS 5讀寫主機板RAID

主機板上內建的RAID通常被稱為Fake RAID,在CentOS 5需要安裝額外支援套件才能正常讀寫。

通常Fake RAID除了在BIOS建立RAID,還需要在OS內配合軟體驅動。在CentOS 6內建的mdadm版本已經可以正常讀寫主機板建立的RAID,不過在CentOS 5需要搭配dmraid套件才能正常讀寫。

安裝套件之前先進入BIOS建立RAID,一定要確認主機板能夠辨識RAID存在才算完成。有Error或開機顯示Offline都必須視為失敗。

先將repoforge加入yum套件來源就可以用yum install直接下載安裝。

[[email protected] ~]# yum install dmraid
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.twaren.net
 * extras: ftp.twaren.net
 * rpmforge: repoforge.spinellicreations.com
 * updates: ftp.twaren.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: dmraid = 1.0.0.rc13-63.el5 for package: dmraid-events
---> Package dmraid.x86_64 0:1.0.0.rc13-65.el5 set to be updated
--> Running transaction check
---> Package dmraid-events.x86_64 0:1.0.0.rc13-65.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch          Version                   Repository   Size
================================================================================
Updating:
 dmraid               x86_64        1.0.0.rc13-65.el5         base        744 k
Updating for dependencies:
 dmraid-events        x86_64        1.0.0.rc13-65.el5         base         24 k

Transaction Summary
================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

Total size: 769 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : dmraid                                                   1/4 
  Updating       : dmraid-events                                            2/4 
  Cleanup        : dmraid-events                                            3/4 
  Cleanup        : dmraid                                                   4/4 

Updated:
  dmraid.x86_64 0:1.0.0.rc13-65.el5                                             

Dependency Updated:
  dmraid-events.x86_64 0:1.0.0.rc13-65.el5                                      

Complete!

先確認自己的主機板RAID是否在dmraid支援清單。

[[email protected] ~]# dmraid  -l
asr     : Adaptec HostRAID ASR (0,1,10)
ddf1    : SNIA DDF1 (0,1,4,5,linear)
hpt37x  : Highpoint HPT37X (S,0,1,10,01)
hpt45x  : Highpoint HPT45X (S,0,1,10)
isw     : Intel Software RAID (0,1,5,01)
jmicron : JMicron ATARAID (S,0,1)
lsi     : LSI Logic MegaRAID (0,1,10)
nvidia  : NVidia RAID (S,0,1,10,5)
pdc     : Promise FastTrack (S,0,1,10)
sil     : Silicon Image(tm) Medley(tm) (0,1,10)
via     : VIA Software RAID (S,0,1,10)
dos     : DOS partitions on SW RAIDs

將剛才在BIOS中建立好的RAID驅動。這裡我使用四顆1TB做RAID10。

[[email protected] ~]# dmraid  -a y
RAID set "isw_fbdgghbcg_Volume0" already active
device "isw_fbdgghbcg_Volume0-0" is now registered with dmeventd for monitoring
device "isw_fbdgghbcg_Volume0-1" is now registered with dmeventd for monitoring
device "isw_fbdgghbcg_Volume0" is now registered with dmeventd for monitoring

在/dev/mapper/確認始否有出現我們要的RAID。確認後可以直接掛載使用了。

[[email protected] ~]# ls /dev/mapper/
control                isw_fbdgghbcg_Volume0-0
isw_fbdgghbcg_Volume0  isw_fbdgghbcg_Volume0-1
[[email protected] ~]# fdisk -l /dev/mapper/isw_fbdgghbcg_Volume0 

Disk /dev/mapper/isw_fbdgghbcg_Volume0: 2000.4 GB, 2000404086784 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/mapper/isw_fbdgghbcg_Volume0 doesn't contain a valid partition table
[[email protected] ~]# mount /dev/mapper/isw_fbdgghbcg_Volume0 /home

參考資料:
關於使用主機板內建RAID安裝CentOS的問題

更新日期: 2017/05/03

推薦內容

2017-05-03T10:16:58+00:002012 / 12 / 19|Categories: Linux系統管理實務|Tags: , , , |