背景
当前Redfish对NVMe盘标准SMART信息接口缺失,需要新增接口支持Redfish查询获取NVMe盘的标准SMART信息。
现有Redfish接口/redfish/v1/Chassis/{ChassisId}/Drives/{DriveId}/Metrics 对 NVMe 盘 SMART 信息仅有部分支持,已经实现PowerOnHours(硬盘通电时间,类型string)以及NVMeSMART 。其中二级属性AvailableSparePercent(驱动器可用冗余空间的百分比,类型number),PercentageUsed (用户实际使用和厂家设定的器件寿命的百分比,类型number), 三级属性PMRUnreliable (控制器的 持久内存区域已变为只读或不可靠,类型bool),OverallSubsystemDegraded (控制器表示由于重要的media错误,器件的可靠性已经降低,类型bool),MediaInReadOnly (控制器介质已经被置为只读模式,类型bool),SpareCapacityWornOut (控制器冗余空间小于设定的阈值,类型bool)。
关联ISSUE
整体方案
后台通过调用资源协作方法GetSmartInfo解析NVMe盘SMART信息,需要添加脚本对SMART Log Info进行解析,将解析结果返回到请求结果中。
评审点
| 评审点 | 标题 | 接口类型 |
|---|---|---|
| 评审点一 | Redfish中Drive Metrics资源NVMeSMART新增属性 | Redfish |
详细描述
评审点1:Redfish中DriveMetrics资源新增属性
评审点:是否新增属性AvailableSpareThresholdPercent, ControllerBusyTimeMinutes, CriticalCompositeTempTimeMinutes, DataUnitsRead, DataUnitsWritten, EGCriticalWarningSummary, HostReadCommands, HostWriteCommands, MediaAndDataIntegrityErrors, NumberOfErrorInformationLogEntries, PowerCycles, TemperatureSensorsCelsius, ThermalMgmtTemp1TotalTimeSeconds, ThermalMgmtTemp1TransitionCount, ThermalMgmtTemp2TotalTimeSeconds, ThermalMgmtTemp2TransitionCount, UnsafeShutdowns, WarningCompositeTempTimeMinutes
资源URI :/redfish/v1/Chassis/{ChassisId}/Drives/{DriveId}/Metrics
资源版本 :DriveMetrics.v1_3_0
属性列表 :
注1 :下表隐去Redfish规范强制要求的通用基础属性(如@odata.id 、@odata.type 、Id 、Name 等),默认均需实现。
注2 :列表内属性默认均支持GET 操作。
注3 :若属性在Schema中未显式定义 readonly 关键字,则默认为只读 。
| 一级属性名 | 二级属性名 | 三级属性名 | 类型 | 示例/取值约束 | readonly | 易变属性 | 实现PATCH | 操作权限 | 描述 |
|---|---|---|---|---|---|---|---|---|---|
NVMeSMART |
AvailableSpareThresholdPercent |
number, null |
0 ~ 100 |
true |
是 | 否 | ReadOnly |
备用空间阈值百分比,低于该值可能触发事件。 | |
NVMeSMART |
ControllerBusyTimeMinutes |
number, null |
120 |
true |
是 | 否 | ReadOnly |
控制器忙于处理 I/O 命令的总时间(分钟)。 | |
NVMeSMART |
CriticalCompositeTempTimeMinutes |
number, null |
5 |
true |
是 | 否 | ReadOnly |
控制器综合温度 ≥ 临界温度阈值的时间(分钟)。 | |
NVMeSMART |
DataUnitsRead |
number, null |
1000 |
true |
是 | 否 | ReadOnly |
主机从控制器读取的 512 字节数据单元数(以千为单位)。 | |
NVMeSMART |
DataUnitsWritten |
number, null |
800 |
true |
是 | 否 | ReadOnly |
主机写入控制器的 512 字节数据单元数(以千为单位)。 | |
NVMeSMART |
EGCriticalWarningSummary |
object |
/ |
/ |
/ |
/ |
/ |
耐久性组临界警告汇总。 | |
NVMeSMART |
EGCriticalWarningSummary |
NamespacesInReadOnlyMode |
boolean, null |
false |
true |
是 | 否 | ReadOnly |
指示耐久性组中的命名空间是否处于只读模式(非写保护变更导致)。 |
NVMeSMART |
EGCriticalWarningSummary |
ReliabilityDegraded |
boolean, null |
false |
true |
是 | 否 | ReadOnly |
指示耐久性组的可靠性是否因严重介质错误等而降级。 |
NVMeSMART |
EGCriticalWarningSummary |
SpareCapacityUnderThreshold |
boolean, null |
false |
true |
是 | 否 | ReadOnly |
指示耐久性组的可用备用容量是否已低于阈值。 |
NVMeSMART |
HostReadCommands |
number, null |
50000 |
true |
是 | 否 | ReadOnly |
控制器完成的读命令数。 | |
NVMeSMART |
HostWriteCommands |
number, null |
45000 |
true |
是 | 否 | ReadOnly |
控制器完成的写命令数。 | |
NVMeSMART |
MediaAndDataIntegrityErrors |
number, null |
0 |
true |
是 | 否 | ReadOnly |
检测到的未恢复数据完整性错误次数。 | |
NVMeSMART |
NumberOfErrorInformationLogEntries |
number, null |
1 |
true |
是 | 否 | ReadOnly |
生命周期内错误信息日志条目总数。 | |
NVMeSMART |
PowerCycles |
number, null |
10 |
true |
是 | 否 | ReadOnly |
电源循环次数。 | |
NVMeSMART |
TemperatureSensorsCelsius |
array (number, null) |
[30, 32, 31] |
true |
是 | 否 | ReadOnly |
所有温度传感器的当前读数(摄氏度)。 | |
NVMeSMART |
ThermalMgmtTemp1TotalTimeSeconds |
number, null |
3600 |
true |
是 | 否 | ReadOnly |
为降低温度进入低性能热管理状态的总秒数(性能影响最小)。 | |
NVMeSMART |
ThermalMgmtTemp1TransitionCount |
number, null |
5 |
true |
是 | 否 | ReadOnly |
进入性能影响最小热管理状态的次数。 | |
NVMeSMART |
ThermalMgmtTemp2TotalTimeSeconds |
number, null |
120 |
true |
是 | 否 | ReadOnly |
为降低温度进入强热管理状态的总秒数(不考虑性能影响)。 | |
NVMeSMART |
ThermalMgmtTemp2TransitionCount |
number, null |
1 |
true |
是 | 否 | ReadOnly |
进入强热管理状态的次数。 | |
NVMeSMART |
UnsafeShutdowns |
number, null |
0 |
true |
是 | 否 | ReadOnly |
不安全关机次数。 | |
NVMeSMART |
WarningCompositeTempTimeMinutes |
number, null |
30 |
true |
是 | 否 | ReadOnly |
综合温度 ≥ 警告温度阈值的时间(分钟)。 |
Schema说明:
NVMeSMART 参考StorageControllerMetrics.v1_1_0.json
"properties": {
"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": "%"
},
"AvailableSpareThresholdPercent": {
"description": "The available spare threshold as a normalized percentage.",
"longDescription": "This property shall contain the NVMe-defined 'Available Spare Threshold' as a percentage, `0` to `100`. When the available spare falls below this value, an asynchronous event completion may occur.",
"maximum": 100,
"minimum": 0,
"readonly": true,
"type": [
"number",
"null"
],
"units": "%"
},
"CompositeTemperatureCelsius": {
"description": "The composite temperature (C).",
"longDescription": "This property shall contain the composite temperature in degree Celsius units for this storage controller. Services shall derive this value from the NVMe-defined 'Composite Temperature', which represents a composite temperature in kelvin units of the controller and namespaces associated with that controller.",
"readonly": true,
"type": [
"number",
"null"
],
"units": "Cel"
},
"ControllerBusyTimeMinutes": {
"description": "The total time the controller is busy with I/O commands in minutes.",
"longDescription": "This property shall contain the NVMe-defined 'Controller Busy Time', which represents the total time the controller is busy with I/O commands in minutes.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"CriticalCompositeTempTimeMinutes": {
"description": "The amount of time in minutes that the controller has been operational and that the composite temperature has been greater than or equal to the critical composite temperature threshold.",
"longDescription": "This property shall contain the NVMe-defined 'Critical Composite Temperature Time', which represents the amount of time in minutes that the controller has been operational and that the composite temperature has been greater than or equal to the critical composite temperature threshold.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"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'."
},
"DataUnitsRead": {
"description": "The number of 512 byte data units the host has read from the controller as part of processing a SMART Data Units Read Command in units of one thousand.",
"longDescription": "This property shall contain the NVMe-defined 'Data Units Read', which represents the number of 512 byte data units the host has read from the controller as part of processing a SMART Data Units Read Command in units of one thousand.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"DataUnitsWritten": {
"description": "The number of 512 byte data units the host has written to the controller as part of processing a User Data Out Command in units of one thousand.",
"longDescription": "This property shall contain the NVMe-defined 'Data Units Written', which represents the number of 512 byte data units the host has written to the controller as part of processing a User Data Out Command in units of one thousand.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"EGCriticalWarningSummary": {
"$ref": "#/definitions/EGCriticalWarningSummary",
"description": "The Endurance Group critical warnings summary.",
"longDescription": "The property shall contain the NVMe-defined 'Endurance Group Critical Warning Summary'."
},
"HostReadCommands": {
"description": "The number of SMART Host Read Commands completed by the controller.",
"longDescription": "This property shall contain the NVMe-defined 'Host Read Commands', which represents the number of SMART Host Read Commands completed by the controller.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"HostWriteCommands": {
"description": "The number of User Data Out Commands completed by the controller.",
"longDescription": "This property shall contain the NVMe-defined 'Host Write Commands', which represents the number of User Data Out Commands completed by the controller.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"MediaAndDataIntegrityErrors": {
"description": "The number of occurrences where the controller detected an unrecovered data integrity error.",
"longDescription": "This property shall contain the NVMe-defined 'Media and Data Integrity Errors', which represents the number of occurrences where the controller detected an unrecovered data integrity error.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"NumberOfErrorInformationLogEntries": {
"description": "The number of error information log entries over the life of the controller.",
"longDescription": "This property shall contain the NVMe-defined 'Number of Error Information Log Entries', which represents the number of error information log entries over the life of the controller.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"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": "%"
},
"PowerCycles": {
"description": "The number of power cycles.",
"longDescription": "This property shall contain the NVMe-defined 'Power Cycles', which represents the number of power cycles.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"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"
]
},
"TemperatureSensorsCelsius": {
"description": "The temperature sensor readings in degree Celsius units for this storage controller.",
"items": {
"type": [
"number",
"null"
]
},
"longDescription": "This property shall contain an array of temperature sensor readings in degree Celsius units for this storage controller. Services shall derive each array member from the NVMe-defined 'Temperature Sensor' values, which represent a temperature sensor reading in kelvin units.",
"readonly": true,
"type": "array",
"units": "Cel"
},
"ThermalMgmtTemp1TotalTimeSeconds": {
"description": "The number of seconds the controller transitioned to lower power states or performed vendor-specific thermal-management actions while minimizing the impact on performance in order to attempt to reduce the composite temperature.",
"longDescription": "This property shall contain the NVMe-defined 'Total Time For Thermal Management Temperature 1', which represents the number of seconds the controller transitioned to lower power states or performed vendor-specific thermal-management actions while minimizing the impact on performance in order to attempt to reduce the composite temperature.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"ThermalMgmtTemp1TransitionCount": {
"description": "The number of times the controller transitioned to lower power states or performed vendor-specific thermal-management actions while minimizing the impact on performance in order to attempt to reduce the composite temperature.",
"longDescription": "This property shall contain the NVMe-defined 'Thermal Management Temperature 1 Transition Count', which represents the number of times the controller transitioned to lower power states or performed vendor-specific thermal-management actions while minimizing the impact on performance in order to attempt to reduce the composite temperature.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"ThermalMgmtTemp2TotalTimeSeconds": {
"description": "The number of seconds the controller transitioned to lower power states or performed vendor-specific thermal-management actions regardless of the impact on performance in order to attempt to reduce the composite temperature.",
"longDescription": "This property shall contain the NVMe-defined 'Total Time For Thermal Management Temperature 2', which represents the number of seconds the controller transitioned to lower power states or performed vendor-specific thermal-management actions regardless of the impact on performance in order to attempt to reduce the composite temperature.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"ThermalMgmtTemp2TransitionCount": {
"description": "The number of times the controller transitioned to lower power states or performed vendor-specific thermal-management actions regardless of the impact on performance in order to attempt to reduce the composite temperature.",
"longDescription": "This property shall contain the NVMe-defined 'Thermal Management Temperature 2 Transition Count', which represents the number of times the controller transitioned to lower power states or performed vendor-specific thermal-management actions regardless of the impact on performance in order to attempt to reduce the composite temperature.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"UnsafeShutdowns": {
"description": "The number of unsafe shutdowns.",
"longDescription": "This property shall contain the NVMe-defined 'Unsafe Shutdowns', which represents the number of times when the controller does not report it is safe to power down prior to loss of main power.",
"readonly": true,
"type": [
"integer",
"null"
]
},
"WarningCompositeTempTimeMinutes": {
"description": "The amount of time in minutes that the controller has been operational and that the composite temperature has been greater than or equal to the warning composite temperature threshold.",
"longDescription": "This property shall contain the NVMe-defined 'Warning Composite Temperature Time', which represents the amount of time in minutes that the controller has been operational and that the composite temperature has been greater than or equal to the warning composite temperature threshold.",
"readonly": true,
"type": [
"integer",
"null"
]
}
},
"type": "object"
},
RspBody响应体示例
{
"@odata.context": "/redfish/v1/$metadata#DriveMetrics.DriveMetrics",
"@odata.id": "/redfish/v1/Chassis/1/Drives/HDDPlaneDisk45/Metrics",
"@odata.type": "#DriveMetrics.v1_3_0.DriveMetrics",
"Id": "HDDPlaneDisk45",
"Name": "Disk45",
"PowerOnHours": 9299,
"NVMeSMART": {
"AvailableSparePercent": 100,
"AvailableSpareThresholdPercent": 10,
"CompositeTemperatureCelsius": null,
"ControllerBusyTimeMinutes": 45,
"CriticalCompositeTempTimeMinutes": 0,
"CriticalWarnings": {
"MediaInReadOnly": false,
"OverallSubsystemDegraded": false,
"PMRUnreliable": false,
"PowerBackupFailed": false,
"SpareCapacityWornOut": false
},
"DataUnitsRead": 123456,
"DataUnitsWritten": 654321,
"EGCriticalWarningSummary": {
"NamespacesInReadOnlyMode": false,
"ReliabilityDegraded": false,
"SpareCapacityUnderThreshold": false
},
"HostReadCommands": 987654,
"HostWriteCommands": 456789,
"MediaAndDataIntegrityErrors": 0,
"NumberOfErrorInformationLogEntries": 2,
"PercentageUsed": 2,
"PowerCycles": 32,
"PowerOnHours": 9299,
"TemperatureSensorsCelsius": [30, 32, null, null, null, null, null, null],
"ThermalMgmtTemp1TotalTimeSeconds": 120,
"ThermalMgmtTemp1TransitionCount": 3,
"ThermalMgmtTemp2TotalTimeSeconds": 0,
"ThermalMgmtTemp2TransitionCount": 0,
"UnsafeShutdowns": 1,
"WarningCompositeTempTimeMinutes": 15
}
}
是否准备好AI预审
是