January 21, 201115 yr I am currently pre-clearing my three WDEARS 2TB drives (using the latest version of the pre-clear script and unRAID v4.7), which are now on their 4th and final cycle. One question I have is that the longest process seems to be the reading of the disk once the clear process (zero's have been written) has been completed. Coming from the perspective of not fully understanding what the pre-clear script is doing beyond stress testing the drives and writing zeros all over it, is it necessary to read the drive after every cycle, rather than just the last cycle?
January 21, 201115 yr there is the pre-zero reads and post-zero reads. They both help stress test the drives. READ Joe L's following reply. I misunderstood exactly what the -N parm did BUT if you were wanting to skip the post-read, you would use the -N [uppercase] parm for the pre-clear script. Since you are doing 4 cycles, and only want to perform the post-read on the last cycle, what you would do would be: preclear_disk.sh -c 3 -N /dev/sd* then after those, you would do 1 more (for your 4th) preclear_disk.sh /dev/sd* (if you wanted to skip both pre & post reads, you would use -n [lowercase] parm) Usage: $progname [-t] [-n] [-N] [-m e-mail-addr] [-M 1|2|3|4] [-c count] /dev/??? where = hda, hdb, sda, sdb, etc... -n = Do NOT perform preread and postread of entire disk to allow SMART firmware to reallocate bad blocks in the clearing process -N = Do not perform read validation during postread. (skip this step) (basic test to check if values read are all zero as expected. Skipping this test will save a few miniutes, but possibly not detect a drive that returns non-zero values when zeros were expected as bad.) -c count = perform count preread/clear/postread cycles where count is a number from 1 through 20 If not specified, default is 1 cycle. For large disks, 1 cycle can take 10 or more hours -t = Test if disk has pre-clear signature. This option may NOT be combined with the -c or -n options. The test does not write to the disk. It makes no changes to a disk at all. It only reads the first 512 bytes of the disk to verify a pre-clear signature exists. Note: "-t" does not read the entire disk to verify it it pre-cleared as that could take hours for a large disk. since the pre-clear-signature is written *after* a disk is entirely filled with zeros, if it exists, we assume the disk is cleared. -w size = write block size in bytes -r size = read block size in bytes -b count = number of blocks to read at a time -v = print version of $progname -m [email protected] = optional recipient address. If blank and -M option is used, it will default to default e-mail address of "root" -M 1 = Will send an e-mail message at the end of the final results (default if -m is used, but no other -M option given) -M 2 = Will send an e-mail same as 1 plus at the end of a cycle (if multiple cycles are specified) -M 3 = Will send an e-mail same as 2 plus at the start and end of the pre-read, zeroing, post-read -M 4 = Will send an e-mail same as 3 plus also at intervals of 25% during the long tests The -m, -M options requires that a valid working mail command is installed. One version that has worked (bashmail) is affilaited with the unraid_notify script. There are others that also will work. Any of these need to be configured to work with your mail server. The unraid_notify script will have instructions on how to configure this. See http://lime-technology.com/forum/index.php?topic=2470.0 for unraid_notify and http://lime-technology.com/forum/index.php?topic=2961.0 for the mail script. NOTE: The lastest verion of mail has to be used. earlier versions of the mail script affiliated with unraid_notify do not support the standard mail syntax needed. Unless the -n option is specified the disk will first have its entire set of blocks read, then, the entire disk will be cleared by writing zeros to it. Once that is done the disk will be partitioned with a special signature that the unRAID software will recognize when the drive is added to the array. This special signature will allow the unraid software to recognize the disk has been pre-cleared and to skip an initial "clearing" step while the server remains off-line. The pre-read and post-read phases try their best to exercise the disk in a way to identify a drive prone to early failure. It performs reads of random blocks of data interspersed with reads of sequential blocks on the disk in turn. This program also uses non-buffered reads of the first and last cylinders on the disk, the goal is to perform those reads in between the others, and to keep the disk head moving much more than if it just read each linear block in turn.
January 21, 201115 yr there is the pre-zero reads and post-zero reads. They both help stress test the drives. BUT if you were wanting to skip the post-read, you would use the -N [uppercase] parm for the pre-clear script. That does not stop the post-read, just the verification that it is reading back all zeros. It still does the post-read, it just does not look at the contents of what is being read. Skipping the verification is a false economy in my opinion. Since you are doing 4 cycles, and only want to perform the post-read on the last cycle, what you would do would be: Since you are doing 4 cycles, and only want to perform the post-read VERIFICATION on the last cycle, what you would do would be: preclear_disk.sh -c 3 -N /dev/sd* followed by preclear_disk.sh /dev/sd* Yes, it is necessary to read between each "write" cycle. It is only on a read that the SMART firmware on the disk will identify un-readable sectors and mark it for pending re-allocation, and only on a "write" where it will re-allocate a sector pending re-allocation. Therefore, the read and write cycles must alternate. The verification of what is being read was added after several users found drives that returned no errors, but occasional random data instead of all zeros. Those drives cause hair loss, since you'll pull out your hair trying to figure out why you get random parity errors. Tough to figure out it is one specific disk drive when there are no other errors or symptoms. Joe L.
January 21, 201115 yr Thanks Joe for correcting my misunderstanding. Clarification, does the -n parm just skip validation or the actual pre/post reads? I always let it pre/post read on all cycles...all the better workout for the drive.
January 21, 201115 yr Thanks Joe for correcting my misunderstanding. Clarification, does the -n parm just skip validation or the actual pre/post reads? It skips pre and post reads, and since the post read is not performed, no verification is possible) I always let it pre/post read on all cycles...all the better workout for the drive. Good. There have been many improvements to the pre-clear script recently, and more to come. Be sure to download/verify you have the newest version before using it. Joe L.
Archived
This topic is now archived and is closed to further replies.