yonlee 发表于 2018-6-22 10:45:16

Hetzner Hardware-RAID设置

本帖最后由 yonlee 于 2018-6-22 10:57 编辑

官方指导 https://wiki.hetzner.de/index.php/LSI_RAID_Controller/en
在Rescue模式下连接ssh
查看已有raid信息
megacli -LDInfo -Lall -Aall
示例 RAID 1:
Adapter 0 -- Virtual Drive Information:
Virtual Disk: 0 (Target Id: 0)
Name:
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
Size:697.560 GB
State: Optimal
Stripe Size: 64 KB
Number Of Drives:2
Span Depth:1
Default Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
Access Policy: Read/Write
Disk Cache Policy: Enabled
Encryption Type: None

Exit Code: 0x00
设置raid
查看 Enclosure Number 和 Slot Number
megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"
注意,如果你的status是"Unconfigured (bad)",请使用以下命令(我没用过)
megacli -PDMakeGood -PhysDrv[<Enclosure#>:<Slot#>] -a0
清除已有设置
删除逻辑分区
megacli -CfgLdDel -Lall -aAll
或,删除所有(我用的这个)
megacli -CfgClr -aAll
设置raid0
megacli -CfgLdAdd -r0 [<Enclosure#1>:<Slot#1>,<Enclosure#2>:<Slot#2>] WB RA Direct CachedBadBBU -a0
<Enclosure#1> 磁盘1的 Enclosure Number
<Slot#1> 磁盘1的 Slot Number

设置raid1
megacli -CfgLdAdd -r1 [<Enclosure#1>:<Slot#1>,<Enclosure#2>:<Slot#2>] WB RA Direct CachedBadBBU -a0

我买的是一块300gSAS,两块3T盘,我的设置是这样的
megacli -CfgLdAdd -r0 WB RA Direct CachedBadBBU -a0
megacli -CfgLdAdd -r0 WB RA Direct CachedBadBBU -a1
设置可启动阵列
我不确定这个是做什么的,反正我设置了,dd正常

查看可启动阵列,可启动阵列不存在
root@rescue ~ # megacli -AdpBootDrive -get -a0

Adapter 0: No Virtual drive or Physical Drive is configured as boot drive.

Exit Code: 0x00
设置a0位为可启动阵列
root@rescue ~ # megacli -AdpBootDrive -set -L0 -a0

Boot Virtual Drive is set to #0 (target id #0) on Adapter 0

Exit Code: 0x00

赚钱 发表于 2018-6-22 10:53:24

mjj分享越来越多了

西崽猪猪 发表于 2018-6-22 10:54:59

你可以要上kvm 然后图文2分钟设置完毕。yc008t

yonlee 发表于 2018-6-22 10:55:43

西崽猪猪 发表于 2018-6-22 10:54
你可以要上kvm 然后图文2分钟设置完毕。

hardware raid用kvm干什么?

西崽猪猪 发表于 2018-6-22 10:59:14

yonlee 发表于 2018-6-22 10:55
hardware raid用kvm干什么?

kvm下 ctrl+H解决的事情,搞这么复杂

yonlee 发表于 2018-6-22 11:03:10

西崽猪猪 发表于 2018-6-22 10:59
kvm下 ctrl+H解决的事情,搞这么复杂

随你咯,申请kvm的时间我早就设置好了。kvm那个图形化界面我也用过,卡成b
页: [1]
查看完整版本: Hetzner Hardware-RAID设置