背景
当前redfish标准接口存在缺失,需要新增redfish标准接口。
关联ISSUE
[需求]: Storage/Drive/相关资源支持redfish新标准
评审点:
新增URI:/redfish/v1/Chassis/{ChassisId}/Drives/{DrivesId}/Metrics
详细描述
评审点: /redfish/v1/Chassis/{ChassisId}/Drives/{DriveId}/Metrics
变化类型:新增URI
操作类型: GET
应用场景:获取Drive硬件诊断信息
RspBody响应体结构:
| 一级属性 | 二级属性 | 三级属性 | 属性说明 |
|---|---|---|---|
| @odata.context | DriveMetrics资源的的OData描述信息,/redfish/v1/$metadata#DriveMetrics.DriveMetrics | ||
| @odata.id | DriveMetrics资源URI的访问路径, /redfish/v1/Chassis/{ChassisId}/Drives/{DriveId}/Metrics | ||
| @odata.type | DriveMetrics资源schema版本号,#DriveMetrics.v1_3_0.DriveMetrics | ||
| Id | DriveMetrics资源 Id | ||
| Name | DriveMetrics资源名称 | ||
| PowerOnHours | 硬盘通电时间 | ||
| NVMeSMART | PowerOnHours | 硬盘通电时间 | |
| NVMeSMART | AvailableSparePercent | 驱动器可用冗余空间的百分比 | |
| NVMeSMART | PercentageUsed | 用户实际使用和厂家设定的器件寿命的百分比 | |
| NVMeSMART | CriticalWarnings | PMRUnreliable | 控制器的持久内存区域是否已变为只读或不可靠 |
| NVMeSMART | CriticalWarnings | PowerBackupFailed | 控制器的易失性器件是否fail |
| NVMeSMART | CriticalWarnings | MediaInReadOnly | 控制器介质是否已经被置为只读模式 |
| NVMeSMART | CriticalWarnings | OverallSubsystemDegraded | 控制器是否由于重要的media错误,器件的可靠性已经降低 |
| NVMeSMART | CriticalWarnings | SpareCapacityWornOut | 控制器冗余空间是否小于设定的阈值 |
属性说明,
| 属性名称 | 取值类型 | 操作权限 | 默认值 | 取值范围 | 说明 | 是否频繁变化并需要屏蔽变化事件 | 约束 |
|---|---|---|---|---|---|---|---|
| PowerOnHours | number,null | ReadOnly | 0~1.7976931348623157e+308 | 硬盘通电时间 | 否 | 需要硬盘支持此功能配置 | |
| NVMeSMART/PowerOnHours | number,null | ReadOnly | 0~1.7976931348623157e+308 | 硬盘通电时间 | 否 | 需要硬盘支持此功能配置 | |
| NVMeSMART/AvailableSparePercent | number,null | ReadOnly | 0-100 | 驱动器可用冗余空间的百分比 | 否 | 需要硬盘支持此功能配置 | |
| NVMeSMART/PercentageUsed | number,null | ReadOnly | 0-100 | 用户实际使用和厂家设定的器件寿命的百分比 | 否 | 需要硬盘支持此功能配置 | |
| NVMeSMART/CriticalWarnings/SpareCapacityWornOut | bool | ReadOnly | false | true,false | 表示控制器冗余空间小于设定的阈值 | 否 | 需要硬盘支持此功能配置 |
| NVMeSMART/CriticalWarnings/OverallSubsystemDegraded | bool | ReadOnly | false | true,false | 表示控制器由于重要的media错误,器件的可靠性已经降低 | 否 | 需要硬盘支持此功能配置 |
| NVMeSMART/CriticalWarnings/MediaInReadOnly | bool | ReadOnly | false | true,false | 表示控制器介质已经被置为只读模式 | 否 | 需要硬盘支持此功能配置 |
| NVMeSMART/CriticalWarnings/PMRUnreliable | bool | ReadOnly | false | true,false | 表示控制器的持久内存区域已变为只读或不可靠 | 否 | 需要硬盘支持此功能配置 |
| NVMeSMART/CriticalWarnings/PowerBackupFailed | bool | ReadOnly | false | true,false | 表示控制器的易失性器件fail | 否 | 需要硬盘支持此功能配置 |
schema说明:
新增schema文件drivemetrics.v1_3_0.json
"PowerOnHours": {
"description": "The number of power-on hours for the lifetime of the drive.",
"longDescription": "This property shall contain the number of power-on hours for the lifetime of the drive.",
"readonly": true,
"type": [
"number",
"null"
]
},
"NVMeSMART": {
"$ref": "http://redfish.dmtf.org/schemas/v1/StorageControllerMetrics.json#/definitions/NVMeSMARTMetrics",
"description": "The NVMe SMART metrics for the drive.",
"longDescription": "This property shall contain the NVMe SMART metrics for the drive as defined by the NVMe SMART/Health Information log page. This property shall not be present if the service represents NVMe controllers in the drive as StorageController resources."
}
NVMeSMART定义,查看StorageControllerMetrics.v1_1_0.json
"CriticalWarnings": {
"$ref": "http://redfish.dmtf.org/schemas/v1/StorageController.json#/definitions/NVMeSMARTCriticalWarnings",
"description": "The NVMe SMART critical warnings.",
"longDescription": "The property shall contain the NVMe-defined 'Critical Warning'."
},
"PowerOnHours": {
"description": "The number of power-on hours.",
"longDescription": "This property shall contain the NVMe-defined 'Power On Hours', which represents the number of power-on hours.",
"readonly": true,
"type": [
"number",
"null"
]
},
"AvailableSparePercent": {
"description": "The normalized percentage of the remaining spare capacity available.",
"longDescription": "This property shall contain the NVMe-defined 'Available Spare', which represents the normalized percentage, `0` to `100`, of the remaining spare capacity available.",
"maximum": 100,
"minimum": 0,
"readonly": true,
"type": [
"number",
"null"
],
"units": "%"
},
"PercentageUsed": {
"description": "The percentage of the NVM subsystem life used.",
"longDescription": "This property shall contain the NVMe-defined 'Percentage Used', which represents a vendor-specific estimate of the percentage of the NVM subsystem life used based on the actual usage and the manufacturer's prediction of NVM life. A value of `100` indicates that the estimated endurance of the NVM in the NVM subsystem has been consumed, but this may not indicate an NVM subsystem failure. The value is allowed to exceed `100`. Percentages greater than `254` shall be represented as `255`.",
"maximum": 255,
"minimum": 0,
"readonly": true,
"type": [
"number",
"null"
],
"units": "%"
},
CriticalWarnings定义,查看StorageController.v1_10_0.json的NVMeSMARTCriticalWarnings,
"MediaInReadOnly": {
"description": "Indicates the media has been placed in read-only mode.",
"longDescription": "This property shall indicate the media has been placed in read-only mode. This is not set when the read-only condition of the media is a result of a change in the write protection state of a namespace.",
"readonly": true,
"type": [
"boolean",
"null"
]
},
"OverallSubsystemDegraded": {
"description": "Indicates that the NVM subsystem reliability has been compromised.",
"longDescription": "This property shall indicate that the NVM subsystem reliability has been compromised.",
"readonly": true,
"type": [
"boolean",
"null"
]
},
"PMRUnreliable": {
"description": "The Persistent Memory Region has become unreliable.",
"longDescription": "This property shall indicate that the Persistent Memory Region has become unreliable. PCIe memory reads can return invalid data or generate poisoned PCIe TLP(s). Persistent Memory Region memory writes might not update memory or might update memory with undefined data. The Persistent Memory Region might also have become non-persistent.",
"readonly": true,
"type": [
"boolean",
"null"
]
},
"PowerBackupFailed": {
"description": "Indicates that the volatile memory backup device has failed.",
"longDescription": "This property shall indicate that the volatile memory backup device has failed.",
"readonly": true,
"type": [
"boolean",
"null"
]
},
"SpareCapacityWornOut": {
"description": "Indicates that the available spare capacity has fallen below the threshold.",
"longDescription": "This property shall indicate that the available spare capacity has fallen below the threshold.",
"readonly": true,
"type": [
"boolean",
"null"
]
}
RspBody响应体示例:
{
"@odata.context": "/redfish/v1/$metadata#DriveMetrics.DriveMetrics",
"@odata.id": "/redfish/v1/Chassis/1/Drives/HDDPlaneDisk0/Metrics",
"@odata.type": "#DriveMetrics.v1_3_0.DriveMetrics",
"Id": "HDDPlaneDisk0",
"Name": "Disk0",
"PowerOnHours": 8455,
"NVMeSMART": {
"PowerOnHours": 8455,
"AvailableSpare": 255,
"UsedPercentage": 255,
"CriticalWarning": {
"PMRUnreliable": true,
"PowerBackupFailed": true,
"MediaInReadOnly": true,
"OverallSubsystemDegraded": true,
"SpareCapacityWornOut": true
}
}
}
评审结论
同意新增URI :/redfish/v1/Chassis/{ChassisId}/Drives/{DriveId}/Metrics,响应包含属性 @odata.context、@odata.id、@odata.type、Id、Name;PowerOnHours(硬盘通电时间,类型string)以及NVMeSMART 。其中二级属性AvailableSparePercent(驱动器可用冗余空间的百分比,类型number),PercentageUsed (用户实际使用和厂家设定的器件寿命的百分比,类型number), 三级属性PMRUnreliable (控制器的 持久内存区域已变为只读或不可靠,类型bool),OverallSubsystemDegraded (控制器表示由于重要的media错误,器件的可靠性已经降低,类型bool),MediaInReadOnly (控制器介质已经被置为只读模式,类型bool),SpareCapacityWornOut (控制器冗余空间小于设定的阈值,类型bool), 权限都是Readonly。