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

Best way to test new HDD's for a cheap storage server

· 52CE 我爱测

I want to build a storage server and bought 10 x 2TB WD RED's . The HDD's just arrived. Is there any tool you guys use to check for bad drives or to best defend against infant mortality before copying real data on to your disks? …

问题原文

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

I want to build a storage server and bought 10 x 2TB WD RED's. The HDD's just arrived.

Is there any tool you guys use to check for bad drives or to best defend against infant mortality before copying real data on to your disks?

Is it better to check each single HDD or to test the array (ZFS raid-z2) through copying a lot of data on it?

已采纳解答

原帖链接 · Jens Timmerman · CC BY-SA 3.0

I had the same question 2 months ago. After sending in a failed disk, the replacement disk failed in my NAS after 3 days. So I decided I would now test the new replacement before putting it in production. I do not test every new disk I buy, only on 'refurbished' disks, which I do not completely trust.

If you decide you want to test these disks I would recommend running a badblocks scan and an extended SMART test on the brand new hard disk.

On a 2TB disk this takes up to 48 hours, The badblock command writes the disk full with a pattern, then reads the blocks again to see if the pattern is actually there, and will repeat this with 4 different patterns.

This command will probably not actually show up any bad blocks on a new disk, since disks reallocate bad blocks these days.

So before and after this I ran a smart test, and check the reallocated and current pending sector count. If any of these have gone up, your disk has some bad blocks already and so might prove untrustworthy.

After this I run an extended SMART test again.

You might want to install smartctl or smartmontools first.

Warning, the badblocks -w flag will overwrite all data on your disk, if you just want to do a read check, without overwriting the disk, use badblocks -vs /dev/sdX

sudo smartctl -a /dev/sdX
# record these numbers
sudo badblocks -wvs /dev/sdX
# let it run for 48 hours
sudo smartctl -a /dev/sdX
# compare numbers
sudo smartctl -t long /dev/sdX
# this might take another hour or 2, check results periodically with
sudo smartctl -a /dev/sdX

If after this your smart values seem ok I would trust the disk.

To know what each smart value means, you can start looking here

http://en.wikipedia.org/wiki/Self-Monitoring,_Analysis,_and_Reporting_Technology

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

资料来源与适用范围

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

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

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