大网数据广告活动
服务器运维问答

Health Tests on NVMe

· 52CE 我爱测

On the servers I have, with HDD or SSD, I have a cron that periodically runs: /usr/sbin/smartctl --test=short/long /dev/sd1 (for each disk) While it runs, it just looks at the output of /usr/sbin/smartctl -c /dev/sd1 , looping un…

问题原文

原帖链接 · Nuno · CC BY-SA 4.0

On the servers I have, with HDD or SSD, I have a cron that periodically runs:

/usr/sbin/smartctl --test=short/long /dev/sd1

(for each disk)

While it runs, it just looks at the output of /usr/sbin/smartctl -c /dev/sd1, looping until it no longer contains:

[0-9]+% of test remaining.

And then checks if it completed without errors:

(   0)  The previous self-test routine completed

However, it appears that smartctl doesn't yet support testing of NVMe, as of version 7.0, and as per: https://www.smartmontools.org/wiki/NVMe_Support

It does say that

The smartd daemon tracks health (-H), error count (-l error) and temperature (-W DIFF,INFO,CRIT)

but what does actually run the tests? I'm not sure if the output of -H and -l update unless we run short/long tests?

I also read about nvme-cli, but I don't seem to find ways of running health tests on disks with it.

Any ideas?

Using CentOS 7 here.

已采纳解答

原帖链接 · shodanshok · CC BY-SA 4.0

SMART self-test were conceived for mechanical disks. SATA SSDs almost completely mirrors earlier HDD interface-level behavior supporting such self-test but not doing very much when you run it, actually. NVMe drives dropped such SMART self-test routines entirely.

For flash-based disks one should really track cells wear, spare block count and reallocated sectors rather then relying on old self-test routines which are not supported on NVMe drives.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-11-24)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。