- yonlee2018-06-22金牌会员118841
- 本帖最后由 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[:] -a0复制代码
清除已有设置
删除逻辑分区- megacli -CfgLdDel -Lall -aAll复制代码
或,删除所有(我用的这个)
- megacli -CfgClr -aAll复制代码
设置raid0
- megacli -CfgLdAdd -r0 [:,:] WB RA Direct CachedBadBBU -a0复制代码
磁盘1的 Enclosure Number
磁盘1的 Slot Number设置raid1
- megacli -CfgLdAdd -r1 [:,:] WB RA Direct CachedBadBBU -a0复制代码
我买的是一块300gSAS,两块3T盘,我的设置是这样的
- megacli -CfgLdAdd -r0 [252:2] WB RA Direct CachedBadBBU -a0复制代码- megacli -CfgLdAdd -r0 [252:0,252:1] 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复制代码