Jump to content

HDD Test


CrackerJack

Recommended Posts

It's a very good idea to test a new disk before committing your data to it. I do a short SMART self-test to make sure it has survived the journey, first. Then I do

badblocks -wvs /dev/sdX

at the command line which does a thorough four-pass read/write test, erasing any data already on the disk and potentially erasing the data on another disk if you get the value of X wrong. So beware! It takes a long time but if a disk passes and the SMART report looks good I'm happy to commit it to the array.

 

Link to comment
10 hours ago, Frank1940 said:

There is also the preclear plugin.

 

Except that the rc.diskinfo thing still causes problems. I was trying to avoid mentioning the preclear plugin after the mauling I got in its support thread for daring to ask if anyone fancied writing a simple plugin for testing disks. As far as I'm concerned, preclear in all its forms is dead. Time to move on.

 

10 hours ago, Frank1940 said:

It uses a GUI interface and protects the user from accidentally 'working' on the wrong disk.

 

A very good point and one of the reasons I'd like to see badblocks wrapped into a simple plugin. Unfortunately there were no takers and I don't know how to write plugins.

Link to comment

Thank you for the replies.

 

John_M if I run badblocks and badblocks are found are their locations recorded so they are not used in the future.  Sorry if my terminology is not correct. 

 

You also mention that if the SMART report looks good you're happy.  How do I judge if the report is acceptable?  

 

I'm going to be using 4 WD Red HDDs - Cache, Parity and 2 Data I'm hoping I can pre-test the HDDs to identify and exclude any bad sectors from use.  I realize that HDDs degrade overtime so I would expect having to run a SMART test on a regular basis.  

Link to comment

The badblocks command I gave performs a read/write test in four passes. So first it writes a pattern of bytes onto the whole of the disk, then it reads them back. If the drive fails to read any of the sectors it makes them as pending reallocation. With the second pass badblocks writes a different pattern and as it does so the drive reallocates any bad sectors detected by the first pass. Then it reads the whole of the disk again. Repeat for two more passes. It's a pretty good test. It also has other modes that are safe to use on disks that contain data. The only disadvantage is that you have to run it from the command line as there is no friendly GUI wrapper for it.

 

Regarding SMART, you can use it in two ways. The Dashboard page of the unRAID GUI gives a simple view - a green thumbs up if critical SMART parameters are within spec; an orange warning triangle if there's a problem. Click on that icon and much more information is revealed which, with a little experience, you can interpret for yourself. The experience is needed because each manufacturer implements SMART in a slightly different way. Seagate, for example, reports raw error rates which look alarming if you're not expecting them. Other manufacturers report only errors that can't be corrected so their SMART status looks cleaner.

 

SMART monitoring is an ongoing process within the drive's own firmware but you can issue a command (within the GUI it's a click of a button) to run either a short self-test or an extended self-test. The short test takes a couple of minutes and tests basic functions of the drive electronics. I always run that before anything else just to check that the drive has survived the journey from the supplier. If it fails I send it back immediately for a replacement. The extended self-test takes several hours and reads every sector of the disk, so it's more thorough. I run it occasionally (two or three times a year) or when needed.

 

If you're ever in any doubt just post to this forum.

Link to comment

I've assigned a HDD as drive 1 and tried to run badblocks but get the following:

 

Last login: Sun Apr  8 17:20:04 -0400 2018 on /dev/pts/0.
root@unRAID-NAS:~# badblocks -wvs /dev/sd1
badblocks: No such file or directory while trying to determine device size
root@unRAID-NAS:~#

 

I'm doing this before I started the array??

Link to comment

I am not familiar with badblocks, but wouldn't the device be /dev/sdb (or /dev/sdc or /dev/sdd etc.) according to the device name assigned?  Check in the UI for the actual assignment, but note that this can potentially change from one boot up to the next. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...