宇宙主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

欧基零壹微头条IP归属甄别
查看: 2850|回复: 5

Hetzner Hardware-RAID设置

[复制链接]
发表于 2018-6-22 10:45:16 | 显示全部楼层 |阅读模式
本帖最后由 yonlee 于 2018-6-22 10:57 编辑

官方指导 https://wiki.hetzner.de/index.php/LSI_RAID_Controller/en
在Rescue模式下连接ssh
查看已有raid信息
  1. megacli -LDInfo -Lall -Aall
复制代码

示例 RAID 1:
  1. Adapter 0 -- Virtual Drive Information:
  2. Virtual Disk: 0 (Target Id: 0)
  3. Name:
  4. RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
  5. Size:697.560 GB
  6. State: Optimal
  7. Stripe Size: 64 KB
  8. Number Of Drives:2
  9. Span Depth:1
  10. Default Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
  11. Current Cache Policy: WriteBack, ReadAhead, Cached, Write Cache OK if Bad BBU
  12. Access Policy: Read/Write
  13. Disk Cache Policy: Enabled
  14. Encryption Type: None

  15. Exit Code: 0x00
复制代码

设置raid
查看 Enclosure Number 和 Slot Number
  1. megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"
复制代码

注意,如果你的status是"Unconfigured (bad)",请使用以下命令(我没用过)
  1. megacli -PDMakeGood -PhysDrv[<Enclosure#>:<Slot#>] -a0
复制代码

清除已有设置
删除逻辑分区
  1. megacli -CfgLdDel -Lall -aAll
复制代码

或,删除所有(我用的这个)
  1. megacli -CfgClr -aAll
复制代码

设置raid0
  1. 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
  1. megacli -CfgLdAdd -r1 [<Enclosure#1>:<Slot#1>,<Enclosure#2>:<Slot#2>] WB RA Direct CachedBadBBU -a0
复制代码


我买的是一块300gSAS,两块3T盘,我的设置是这样的
  1. megacli -CfgLdAdd -r0 [252:2] WB RA Direct CachedBadBBU -a0
复制代码
  1. megacli -CfgLdAdd -r0 [252:0,252:1] WB RA Direct CachedBadBBU -a1
复制代码

设置可启动阵列
我不确定这个是做什么的,反正我设置了,dd正常

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

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

  3. Exit Code: 0x00
复制代码

设置a0位为可启动阵列
  1. root@rescue ~ # megacli -AdpBootDrive -set -L0 -a0

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

  3. Exit Code: 0x00
复制代码
发表于 2018-6-22 10:53:24 | 显示全部楼层
mjj分享越来越多了
发表于 2018-6-22 10:54:59 | 显示全部楼层
你可以要上kvm 然后图文2分钟设置完毕。
 楼主| 发表于 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解决的事情,搞这么复杂
 楼主| 发表于 2018-6-22 11:03:10 | 显示全部楼层
西崽猪猪 发表于 2018-6-22 10:59
kvm下 ctrl+H解决的事情,搞这么复杂

随你咯,申请kvm的时间我早就设置好了。kvm那个图形化界面我也用过,卡成b
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|FastFib VPS论坛

GMT+8, 2024-9-21 22:32 , Processed in 0.058280 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表