MySQL Hardware--RAID级别查看

MegaCli查看RAID级别:

## 查raid卡信息(生产商、电池信息及所支持的raid级别)
/usr/local/sbin/MegaCli -AdpAllInfo -aALL |grep -E "Product Name|BBU|Memory Size|RAID Level Supported"

## 查看RAID卡逻辑盘信息
/usr/local/sbin/MegaCli  -LDInfo -LALL -aAll

## 查看RAID卡物流磁盘信息(磁盘空间/生产厂商/磁盘类型)
/usr/local/sbin/MegaCli64 -PDList -aAll |egrep 'Raw Size|Media Type|Inquiry Data'

RAID 5输出:

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
Size                : 1.633 TB
Sector Size         : 512
Parity Size         : 278.875 GB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 7
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAdaptive, Direct, Write Cache OK if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, Write Cache OK if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only

服务器上配置8块300GB的HDD盘,其中使用7块做数据盘(RAID5),因此Number Of Drives为7,而Span Depth为1,剩余1块盘做热备盘,当数据盘发生故障后,热备盘会自动替换发生故障的数据盘,而故障盘被新盘替换后,新盘作为热备盘待用。

在查看物理磁盘信息时,正常磁盘有两种状态:

Firmware state: Online, Spun Up 表示该盘是数据盘

Firmware state: Hotspare, Spun Up 表示该盘为热备盘。

 

RAID 10输出:

Virtual Drive: 1 (Target Id: 1)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 2.906 TB
Sector Size         : 512
Is VD emulated      : Yes
Mirror Data         : 2.906 TB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives per span:2
Span Depth          : 4
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
PI type: No PI

Is VD Cached: No

服务器上配置8块800GB的SSD盘,先每两块作为RAID 1得到4组中间盘,然后4组盘做RAID 0得到最终逻辑盘,因此Number Of Drives为2,而Span Depth为4,Is VD emulated为YES,如果同一组中间盘的两块磁盘同时发生故障,则会导致整个逻辑盘故障。

 

RAID 1输出:

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 278.464 GB
Sector Size         : 512
Is VD emulated      : No
Mirror Data         : 278.464 GB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives    : 2
Span Depth          : 1
Default Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type     : None
PI type: No PI

Is VD Cached: No

上面是2块300GB的HDD做RAID 1,由于做完一次RAID 1后只剩下一组中间盘,也就是最终逻辑盘,因此Number Of Drives为2,而Span Depth为1,Is VD emulated为NO

 

 

HP RAID 10输出:

 

## 看出slot=0控制卡的信息
## hpacucli ctrl slot=0 show config detail

Logical Drive: 1
Size: 2.9 TB
Fault Tolerance: 1+0
Heads: 255
Sectors Per Track: 32
Cylinders: 65535
Strip Size: 256 KB
Full Stripe Size: 1024 KB
Status: OK
Caching:  Disabled
Unique Identifier: 600508B1001C8F28241BBDF0A2141252
Disk Name: /dev/sda
Mount Points: / 19.5 GB, /export 2.9 TB
OS Status: LOCKED
Logical Drive Label: A50FBA8B0014380292C4F90FD91
Mirror Group 0:
	physicaldrive 1I:1:1 (port 1I:box 1:bay 1, Solid State SATA, 800 GB, OK)
	physicaldrive 1I:1:2 (port 1I:box 1:bay 2, Solid State SATA, 800 GB, OK)
	physicaldrive 1I:1:3 (port 1I:box 1:bay 3, Solid State SATA, 800 GB, OK)
	physicaldrive 1I:1:4 (port 1I:box 1:bay 4, Solid State SATA, 800 GB, OK)
Mirror Group 1:
	physicaldrive 2I:1:5 (port 2I:box 1:bay 5, Solid State SATA, 800 GB, OK)
	physicaldrive 2I:1:6 (port 2I:box 1:bay 6, Solid State SATA, 800 GB, OK)
	physicaldrive 2I:1:7 (port 2I:box 1:bay 7, Solid State SATA, 800 GB, OK)
	physicaldrive 2I:1:8 (port 2I:box 1:bay 8, Solid State SATA, 800 GB, OK)
Drive Type: Data

 

 

 

RAID各种级别

RAID 0:条带模式Striped,把联系的数据分散到多个磁盘上存取,多个磁盘并行执行数据请求,每个磁盘处理属于自己的数据请求,并行操作能充分利用总先的带宽,显著提高磁盘整体的存取性能。由于RAID 0没有数据冗余,当任意一块磁盘发生故障都会导致数据无法恢复。

RAID 1:镜像Mirroring,使用2N块磁盘搭建RAID 1,当有数据写入时,数据同时写入镜像盘,以提高阵列的可靠性,提高系统的容错能力,当主硬盘发生损坏是,镜像硬盘可以代替主硬盘工作。RAID 1技术支持热替换,即在不断电的条件下对故障盘进行更换,更换后通过镜像盘即可恢复数据。

RAID 5 :是一种存储性能、数据安全和存储成本兼顾的存储解决方案, 是RAID 0和RAID 1的折中方案,采用奇偶校验来为系统提供数据安全的保障,又提高比RAID 1高的磁盘空间使用率,同时仅有RAID 0相近的读取速度。RAID 5不对数据进行备份,而是把数据和其相应对应的奇偶校验信息分别存储到组成RAID 5的不同磁盘上,让存储中一块磁盘发生损坏后,可以根据剩余磁盘和奇偶校验信息来恢复损坏磁盘上的数据。

RAID10 和RAID 01
RAID01又称为RAID0+1,先进行条带存放(RAID0),再进行镜像(RAID1)。
RAID10又称为RAID1+0,先进行镜像(RAID1),再进行条带存放(RAID0)。

对于RAID 01,允许同一个RAID 0中损坏多快盘,但不允许两个RAID 0中都有坏盘。
对于RAID 10,允许不同RAID 1中有坏盘,但不运行同一RAID 1中两块盘不同时损坏。
虽然RAID 01和RAID 10都兼顾了RAID 1和RAID 0的优点,但是RAID 10中同一RAID 1下两块盘同时损坏的概率远低于RAID 01中两RAID 0下同时坏盘的概率,因此通常使用RAID 10而不采用RAID 01

 

 

参考资料:
http://blog.csdn.net/lincoln_2012/article/details/51925590

posted @ 2019-06-07 19:47  TeyGao  阅读(749)  评论(0编辑  收藏  举报