CrackerJack Posted April 1, 2018 Share Posted April 1, 2018 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 Link to comment
John_M Posted April 1, 2018 Share Posted April 1, 2018 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
Frank1940 Posted April 2, 2018 Share Posted April 2, 2018 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. Link to comment
John_M Posted April 3, 2018 Share Posted April 3, 2018 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
CrackerJack Posted April 3, 2018 Author Share Posted April 3, 2018 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
John_M Posted April 3, 2018 Share Posted April 3, 2018 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
John_M Posted April 3, 2018 Share Posted April 3, 2018 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. Link to comment
CrackerJack Posted April 3, 2018 Author Share Posted April 3, 2018 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! Link to comment
CrackerJack Posted April 8, 2018 Author Share Posted April 8, 2018 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
S80_UK Posted April 8, 2018 Share Posted April 8, 2018 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
CrackerJack Posted April 8, 2018 Author Share Posted April 8, 2018 Thanks S80_UK that fixed it! Link to comment
CrackerJack Posted April 9, 2018 Author Share Posted April 9, 2018 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? Link to comment
John_M Posted April 9, 2018 Share Posted April 9, 2018 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. Link to comment
CrackerJack Posted April 9, 2018 Author Share Posted April 9, 2018 I'm running it in a terminal window. I'm not sure what 'inside screen' means, sorry? Link to comment
John_M Posted April 9, 2018 Share Posted April 9, 2018 https://www.gnu.org/software/screen/manual/screen.html Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.