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

SMART shows unreadble sectors, btrfs scrubs are clean - which is correct?

· 52CE 我爱测

I have a pair of disks in RAID1 formatted with btrfs . The disks go through periodic scrubbing and I get notified with the results. They've been running great for about 2-3 years with no issues. However, I've recently added smart…

问题原文

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

I have a pair of disks in RAID1 formatted with btrfs.

The disks go through periodic scrubbing and I get notified with the results. They've been running great for about 2-3 years with no issues.

However, I've recently added smartd to my installation, and it instantly complained about a small number of unreadable sectors in one of the drives:

Device: /dev/sdc [SAT], 4 Currently unreadable (pending) sectors

I ran a scrub on that drive which found and corrected the same number of errors, but the smart error message doesn't go away. Subsequent scrubs on the same disk show no errors.

I'm not sure which of these tools is the most accurate - is smartd showing a false positive, or is btrfs missing bad sectors, or perhaps I'm misunderstanding the results?

What would be the best way to verify the health of the disk?

Thanks!

已采纳解答

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

Shodanshok's answer is excellent, but to answer your literal question:

What would be the best way to verify the health of the disk?

Do a full write on it. The disk's firmware has marked those sectors as pending reallocation. It can do this when they're written to. This will either 'fix' the sector, or generate reallocated sectors, which you can also see in SMART.

You could then theoretically do a latency read scan on the disk. This is often telling of how reliable sectors are.

And in practical terms, it may be time to replace the disk. This is one of those preludes to failure that I watch for. Another is 'ata exception' in the syslogs. They typically happen before mdadm (or RAID controllers) kicks drives, and I suspect btrfs is similar (though I have no experience).

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

资料来源与适用范围

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

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

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