Set RAID Parameter Command
更新时间: 2025/06/26
在Gitcode上查看源码34h-设置RAID参数(Set-RAID-Parameter-Command)
修订记录
| openUBMC版本号 | 修订日期 | 修订内容 |
|---|---|---|
| 25.06 | 2025/06/26 | 初稿,新增命令详情 |
基本信息
功能说明
设置RAID参数。
权限
命令信息
请求信息
| 字节顺序 | 域取值说明 |
|---|---|
| NetFn | 30h |
| CMD | 93h |
| 1:3 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
| 4 | Sub command,子命令=34h |
| 5 | Raid Controller Id(1 based) |
| 6 | Raid Id(1 based) |
| 7 | Parameter selector,见 表1 。 |
| 8 | [7:1]:reserved [0]:级联标志 0=是最后一帧数据 1=后面还有数据 |
| 9:10 | Offset,写入的数据偏移,从0开始 当数据较长需要多次写入时,一定要从头到尾按顺序写入,不能乱序。 |
| 11:12 | Length,写入长度 |
| 11:N | Configuration parameter data |
响应信息
| 字节顺序 | 域取值说明 |
|---|---|
| 1 | Completion Code 80h=parameter not supported. 81h=attempt to set the 'set in progress' value (in parameter #0) when not inthe 'set complete' state. (This completion code provides a way torecognize that another party has already 'claimed' the parameters.) 82h=attempt to write read-only parameter |
| 2:4 | Manufacturer ID,LS Byte first。长度固定3个字节,例如,某厂家ID是2011,对应十六进制为0x0007DB,则字节序为第1个字节为DBh、第2个字节为07h、第3个字节为00h。 |
命令样例
设置SD Owner为x86
请求:
ipmicmd -k "0f 00 MM NN" smi 0响应:
0f MM NN附表1 RAID 参数
| 参数 | # | 数据 | 说明 |
|---|---|---|---|
| Raid -create Partition | 00h | data1-Partition/LUN Number data2:5-first Partition size(MBYTE, LSB) data6:9-second Partition size data10:13-third Partition size ...... dataN:N+3-nth Partition size | 创建分区接口 |
| Partition Access state(x86) | 01h | data1-Partition Selector(Set Selector) data2-enable state [7]-read enable state 0b-disable 1b-enable [6]-write enable state 0b-disable 1b-enable [5:0]-reservd | 设置分区读使能接口 |
| Partition owner | 02h | data1-owner 00h BMC 01h X86 | 设置分区owner |
| Raid -primiarySD Sel | 03h | data1-SD Card slot | 设置主SD |
| Raid -read err threshold | 04h | data1:4-threshold | 读错误阈值设置 |
| Raid -write err threshold | 05h | data1:4-threshold | 写错误阈值设置 |
| sync mode | 06h | data1-mode 00h auto 01h manual | 同步模式,手动还是自动 |
| start raid rebuild | 07h | data1-direction 00h SD1->SD2 01h SD2->SD1 | 设置同步方向 |
| rebuild status | 08h | data1 0:The storage volume is in sync(已经同步) 1:partition is out of sync(等待同步) 2:partition sync is in progres(正在同步) 3:partition sync was attempted and failed(同步失败) | 查询同步状态 |
| rebuild dir | 09h | data1 00h SD1->SD2 01h SD2->SD1 02h 不满足同步条件 data2~data5 data1为02时,每个bit表示一个条件满足情况。 | 查询期望同步方向 |
| clear metadata | 0ah | na | 清理元数据 |