适用于:Azure Stack HCI 版本 22H2 和 21H2;Windows Server 2022、Windows Server 2019、Windows Server 2016、Windows 10
本文提供有关特定于永久性内存(PMem)设备的错误处理和运行状况管理的信息,通常称为存储类内存(SCM),这是一种可用作顶层存储的非易失性媒体。
这些简短视频概述了 Windows 对永久性内存的支持:
另请参阅 了解和部署永久性内存。
从 Windows Server 2016 和 Windows 10(版本 1607)开始,本机驱动程序支持永久性内存设备。 虽然永久性内存设备的行为与其他磁盘(HDD 和 SSD)类似,但存在一些差异。
常见的用例是,在存储空间中将两个永久性内存模块用作镜像写回缓存。 若要设置此类配置,请参阅 使用 NVDIMM-N 写回缓存配置存储空间。
在 Windows Server 2016 中,存储空间 GUI 将 NVDIMM-N 总线类型显示为 UNKNOWN。 它在创建池、存储 VD 时不会丢失任何功能,也没有任何功能缺陷。 可以通过运行以下 cmdlet 来验证总线类型:
Get-PhysicalDisk | fl
The parameter BusType in the output correctly shows bus type as SCM.
查看持久性内存运行状况
本部分介绍如何查看永久性内存模块的运行状况。 使用永久性内存时,监视体验存在一些差异:
- 永久性内存不会创建物理磁盘性能计数器,因此不会在 Windows Admin Center 的图表上看到它。
- 持久性内存不会创建 Storport 505 数据,因此你不会获得主动离群值检测。
否则,监视体验与其他任何物理磁盘相同。
可以通过运行以下 cmdlet 来查询永久性内存磁盘的运行状况:
Get-PmemDisk
DiskNumber Size HealthStatus AtomicityType CanBeRemoved PhysicalDeviceIds UnsafeShutdownCount
---------- ---- ------------ ------------- ------------ ----------------- -------------------
2 252 GB Unhealthy None True {20, 120} 2
3 252 GB Healthy None True {1020, 1120} 0
Get-PmemDisk | Get-PhysicalDisk | select SerialNumber, HealthStatus, OperationalStatus, OperationalDetails
SerialNumber HealthStatus OperationalStatus OperationalDetails
------------ ------------ ------------------ ------------------
802c-01-1602-117cb5fc Healthy OK
802c-01-1602-117cb64f Warning Predictive Failure {Threshold Exceeded,NVDIMM_N Error}
值得注意的是,可以使用 Get-PhysicalDisk
cmdlet 并将 BusType 指定为 SCM 来获取相同的信息:
Get-PhysicalDisk | where BusType -eq "SCM" | select SerialNumber, HealthStatus, OperationalStatus, OperationalDetails
Note
To find the physical location of a persistent memory device specified in an event, on the Details tab of the event in Event Viewer, go to EventData>Location. 请注意,Windows Server 2016 列出了永久性内存设备的错误位置,但在 Windows Server 版本 1709 中已修复此问题。
HealthStatus shows whether the persistent memory disk is healthy.
The UnsafeshutdownCount value tracks the number of shutdowns that may cause data loss on this logical disk. 这是此磁盘的所有底层持久性内存设备的不安全关闭计数之和。 For more information about the health status, use the Get-PmemPhysicalDevice
cmdlet to find information such as OperationalStatus.
Get-PmemPhysicalDevice
DeviceId DeviceType HealthStatus OperationalStatus PhysicalLocation FirmwareRevision Persistent memory size Volatile memory size
-------- ---------- ------------ ----------------- ---------------- ---------------- ---------------------- --------------------
1020 Intel INVDIMM device Healthy {Ok} CPU2_DIMM_C1 102005310 126 GB 0 GB
1120 Intel INVDIMM device Healthy {Ok} CPU2_DIMM_F1 102005310 126 GB 0 GB
120 Intel INVDIMM device Healthy {Ok} CPU1_DIMM_F1 102005310 126 GB 0 GB
20 Intel INVDIMM device Unhealthy {HardwareError} CPU1_DIMM_C1 102005310 126 GB 0 GB
此 cmdlet 显示哪些永久性内存设备运行不正常。 The unhealthy device (DeviceId 20) matches the case in the previous example. The PhysicalLocation in BIOS can help identify which persistent memory device is in faulty state.
若要了解各种健康状况,请参阅以下部分。
“警告”运行状况
This condition is present when you check the health of a persistent memory device and see that its Health Status is listed as Warning, as shown in this example output:
SerialNumber | HealthStatus | OperationalStatus | OperationalDetails |
---|---|---|---|
802c-01-1602-117cb5fc | Healthy | OK | |
802c-01-1602-117cb64f | Warning | Predictive Failure | {阈值超出,NVDIMM_N错误} |
下表列出了有关此条件的一些信息。
Heading | Description |
---|---|
Likely condition | 警告阈值已超出 |
Root Cause | 永久性内存设备跟踪各种阈值,例如温度、NVM 生存期和/或能源生存期。 超过其中一个阈值时,操作系统会被通知。 |
General behavior | 设备保持完全正常运行。 这是警告,而不是错误。 |
存储空间行为 | 设备保持完全正常运行。 这是警告,而不是错误。 |
More information | PhysicalDisk 对象的 OperationalStatus 字段。 事件日志 – Microsoft-Windows-ScmDisk0101/Operational |
怎么办 | 根据超出的警告阈值,更换永久性内存设备可能是明智的。 |
向持久性内存设备的写入失败
This condition is present when you check the health of a persistent memory device and see the Health Status listed as Unhealthy, and Operational Status mentions an IO Error, as shown in this example output:
SerialNumber | HealthStatus | OperationalStatus | OperationalDetails |
---|---|---|---|
802c-01-1602-117cb5fc | Healthy | OK | |
802c-01-1602-117cb64f | Unhealthy | {过时元数据, IO 错误, 暂时性错误} | {丢失数据持久性, 丢失数据, NV...} |
下表列出了有关此条件的一些信息。
Heading | Description |
---|---|
Likely condition | 持久性/备份电源丢失 |
Root Cause | 永久性内存设备依赖于备份电源(通常是电池或超级电容)来保障其持久性。 如果此备份电源不可用,或者设备出于任何原因(控制器/闪存错误)无法执行备份,则数据处于危险状态,Windows 将阻止对受影响设备进行进一步写入。 仍有可能执行“读取”操作以疏散数据。 |
General behavior | NTFS 卷将被卸除。 所有受影响的 NVDIMM-N 设备的 PhysicalDisk 运行状况状态字段将显示为“不正常”。 |
存储空间行为 | 只要只有一个永久性内存模块受到影响,存储空间就会保持运行状态。 如果多个设备受到影响,则写入存储空间将失败。 所有受影响的持久性内存设备的 PhysicalDisk 运行状况字段将显示为“不正常”。 |
More information | PhysicalDisk 对象的 OperationalStatus 字段。 事件日志 – Microsoft-Windows-ScmDisk0101/Operational |
怎么办 | 建议备份受影响的 PMem 数据。 若要获取读取访问权限,可以手动将磁盘联机(它将显示为只读 NTFS 卷)。 要完全清除这种情况,必须解决根本原因(即提供电源或更换持久性内存模块,视具体问题而定),模块上的卷必须脱机并再次进入联机状态或重新启动系统。 若要使永久性内存模块在存储空间中再次可用,请使用 Reset-PhysicalDisk cmdlet,该 cmdlet 重新初始化设备并启动修复过程。 |
设备以“0”字节的容量或“通用物理磁盘”的形式显示
This condition is present when a persistent memory device is shown with a capacity of 0 bytes and can't be initialized, or is exposed as a "Generic Physical Disk" object with no serial number that displays an Operational Status of Lost Communication, as shown in this example output:
SerialNumber | HealthStatus | OperationalStatus | OperationalDetails |
---|---|---|---|
802c-01-1602-117cb5fc | Healthy | OK | |
Warning | Lost Communication |
下表列出了有关此条件的一些信息。
Heading | Description |
---|---|
Likely condition | BIOS 未向 OS 公开永久性内存模块 |
Root Cause | 永久性内存设备基于 DRAM。 引用损坏的 DRAM 地址时,大多数 CPU 将启动计算机检查并重启服务器。 然后,某些服务器平台取消映射持久性内存模块,以阻止操作系统访问该模块,并可能会引起其他计算机检查。 如果 BIOS 检测到永久性内存模块已失败,并且需要更换,则也可能发生这种情况。 |
General behavior | 永久性内存模块显示为未初始化,容量为 0 字节,无法读取或写入。 |
存储空间行为 | 存储空间仍可正常运行(前提是只有一个永久性内存模块受到影响)。 PMem PhysicalDisk 对象显示“健康状态警告”,并标记为“普通物理磁盘” |
More information | PhysicalDisk 对象的 OperationalStatus 字段。 事件日志 – Microsoft-Windows-ScmDisk0101/Operational |
怎么办 | 必须更换或清理永久性内存设备,以便服务器平台再次将其公开给主机 OS。 建议更换设备,因为可能发生更多无法更正的错误。 可以使用 Add-PhysicalDisk cmdlet 将替换设备添加到存储空间配置。 |
重启后,设备显示为 RAW 或空磁盘
This condition is present when you check the health of a persistent memory device and see a Health Status of Unhealthy and Operational Status of Unrecognized Metadata, as shown in this example output:
SerialNumber | HealthStatus | OperationalStatus | OperationalDetails |
---|---|---|---|
802c-01-1602-117cb5fc | Healthy | OK | {Unknown} |
802c-01-1602-117cb64f | Unhealthy | {无法识别的元数据, 元数据已过时} | {Unknown} |
下表列出了有关此条件的一些信息。
Heading | Description |
---|---|
Likely condition | Backup/Restore Failure |
Root cause | 备份或还原过程中的失败可能会导致永久性内存模块上的所有数据丢失。 当操作系统加载时,它将显示为一个全新的永久性内存设备,没有分区或文件系统,并以 RAW 状态出现,这意味着它没有文件系统。 |
General behavior | 永久性内存将处于只读模式。 执行显式用户操作才能再次使用。 |
存储空间行为 | 如果只有一个永久性内存模块受到影响,存储空间将保持正常运行。 PMem 物理磁盘对象的健康状态将显示为“不正常”,不会被存储空间使用。 |
More information | PhysicalDisk 对象的 OperationalStatus 字段。 事件日志 – Microsoft-Windows-ScmDisk0101/Operational |
怎么办 | 如果用户不想替换受影响的设备,他们可以使用 Reset-PhysicalDisk cmdlet 清除受影响永久性内存模块上的只读条件。 在存储空间环境中,这也将尝试将永久性内存模块重新集成到存储空间中,并启动修复过程。 |
Next steps
有关相关信息,另请参阅: