Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

HDD Test

Featured Replies

I'm a new user and about to build my first NAS.  Is it recommended to test the HDDs before installing unRAID and if so what is the best way to go about this?  I'm using WD Red HDDs.

 

Thanks

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.

 

  • Community Expert

There is also the preclear plugin.  You can find (again) in the Community Apps plugin and a link in its support thread.  It uses a GUI interface and protects the user from accidentally 'working' on the wrong disk.  

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.

  • Author

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.  

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.

You might want to consider using an SSD (or even a pair of them) for the cache and save the large capacity HDDs for the main array.

  • Author

Thank you John_M for your time.  I'm going to also get a SSD for the cache after looking into the pros of this.   Cheers!

  • Author

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??

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. 

Edited by S80_UK

  • Author

Thanks S80_UK that fixed it!

  • Author

Another question badblocks takes a long time to run.  If I start it running and I log out is there a way to check the result the next time I log in?

It takes a long time because it writes and reads every byte of your disk in four passes if you use the -w option. To keep it running while you close the window you'll want to run it inside screen.

  • Author

I'm running it in a terminal window.  I'm not sure what 'inside screen' means, sorry?

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.