n00b question: chkdsk or preclear?


Recommended Posts

Is it possible to just run chkdsk (in Windows) on a candidate drive before mounting it on an unRAID server rather than do a preclear once it's mounted?

 

From what I gather, the preclear does pretty much what chkdsk does (or vice versa), so is there any advantage to one over the other?

 

Usage-wise, I'm thinking along the lines of "saving" the preclear time by just doing chkdsk via a separate windows box.

 

Or am I totally off-base?

Link to comment

Is it possible to just run chkdsk (in Windows) on a candidate drive before mounting it on an unRAID server rather than do a preclear once it's mounted?

 

From what I gather, the preclear does pretty much what chkdsk does (or vice versa), so is there any advantage to one over the other?

 

Usage-wise, I'm thinking along the lines of "saving" the preclear time by just doing chkdsk via a separate windows box.

 

Or am I totally off-base?

They have absolutely nothing to do with each other.  They do not perform the same task, not even close. 

chkdisk is roughly equivalent to "reiserfsck" on linux.  They are both file-system check/repair utilities.

Link to comment

Is it possible to just run chkdsk (in Windows) on a candidate drive before mounting it on an unRAID server rather than do a preclear once it's mounted?

 

From what I gather, the preclear does pretty much what chkdsk does (or vice versa), so is there any advantage to one over the other?

 

Usage-wise, I'm thinking along the lines of "saving" the preclear time by just doing chkdsk via a separate windows box.

 

Or am I totally off-base?

 

They may do similar things but preclear will prepare the drive for insertion into the unRAID array.  preclear sets a special signature on the drive so that unRAID will not attempt to clear it.  Chkdsk in windows WILL NOT do this, and you will have to let unRAID clear the drive itself.  It can take a good 6 hours+ for a new 2TB drive to be cleared and added by unRAID itself AND all that time the array will be unavailable.

 

Preclear gets you past the array downtime.

Link to comment

Got it, thanks.

 

Looking at it from another angle, and considering one can use the free version of unRAID, anyone know if it's possible to boot into unRAID (via USB stick) using the same windows box while leaving the windows install itself untouched?

 

In other words:

 

1) existing windows box, power down

2) insert unRAID stick

3) power on windows box, boots from USB (assume BIOS already set to do this)

4) use as an unRAID machine (do preclears using script)

5) power down

6) remove unRAID stick

7) power on and back to being a windows box

 

I know it seems complicated trying to "bypass" just using the main unRAID server, but knowing if the above is feasible would be good to know as an alternate method.

 

Thanks Community!

Link to comment

Looking at it from another angle, and considering one can use the free version of unRAID, anyone know if it's possible to boot into unRAID (via USB stick) using the same windows box while leaving the windows install itself untouched?

Yes you can do that.  I have done it personally. Like prostuff1 said just be careful to make sure you are preclearing the right drive otherwise you'll be reinstalling windows after the preclear is done.
Link to comment

They may do similar things

Respectfully, they do NONE of the same things. 

 

chkdisk will check and repair a file-system structure that exists on a disk partition to where it is considered "sane" and all the pointers to data point somewhere.  It gives fragments of files it finds without pointers (names) numeric names so you might recover their contents.  It does absolutely nothing to create the partition or create the file-system.  It does not write to the drive other than to repair the file-system hierarchy as best it can.  It does not read the entire drive, it only follows the directory structures that exist to see that they are all sane.

 

the preclear_disk.sh script will read every disk block, then write every disk block, then read them all again.  when reading the disk it will also exercise the disk by constantly reading random sectors in addition to constantly seeking to and reading the very first and last sectors.  When completed. it then creates an initial "signature" on the disk somewhat similar to a disk partition that unRAID will recognize as a pre-cleared disk so it will skip its own internal lengthy clearing step with the array off-line.

 

You cannot duplicate what the pre-clear script does with chkdisk or any ms-dos utility.  The closest you can get to it is a full surface scan (which basically is equivalent to reading all the sectors on the disk, the first of the three steps performed by the pre-clear script.)

 

Good luck with your new server...

 

Joe L.

Link to comment

They may do similar things

Respectfully, they do NONE of the same things.   

 

chkdisk will check and repair a file-system structure that exists on a disk partition to where it is considered "sane" and all the pointers to data point somewhere.   It gives fragments of files it finds without pointers (names) numeric names so you might recover their contents.   It does absolutely nothing to create the partition or create the file-system.  It does not write to the drive other than to repair the file-system hierarchy as best it can.  It does not read the entire drive, it only follows the directory structures that exist to see that they are all sane.

 

the preclear_disk.sh script will read every disk block, then write every disk block, then read them all again.  when reading the disk it will also exercise the disk by constantly reading random sectors in addition to constantly seeking to and reading the very first and last sectors.  When completed. it then creates an initial "signature" on the disk somewhat similar to a disk partition that unRAID will recognize as a pre-cleared disk so it will skip its own internal lengthy clearing step with the array off-line.

 

You cannot duplicate what the pre-clear script does with chkdisk or any ms-dos utility.  The closest you can get to it is a full surface scan (which basically is equivalent to reading all the sectors on the disk, the first of the three steps performed by the pre-clear script.)

 

Good luck with your new server...

 

Joe L.

 

Understood, part of the learning process, and it never hurts to ask about possible shortcuts  :)

Thanks!

 

 

also - you have to take in consideration  that a preclear of a 2Tb drive is taking about 30 to 36 hours - if that windows machine is your main rig

 

Nah, it's just an extra atom-powered machine that's used for occasional torrents.

Link to comment

I preclear my new drives all the time for at least a 6-count through the script.  This means nothing short of about 10 days for a 2TB drive. 

 

I like to do it on a "bench" machine so it can be connected for that long and protected by a UPS that would carry it through more than about 30 minutes power failure. It's just a bare motherboard with some RAM, a chip and power supply connected - something I can throw together and smack down in a corner in a few minutes with no fuss. 

 

But I have done this on my server, and on my backup server.  Waiting that long to get my "Windows" box back is a non-starter for me, though  ;)

Link to comment

I preclear my new drives all the time for at least a 6-count through the script.  This means nothing short of about 10 days for a 2TB drive.

Holy #$)%!!  :o  And I thought that it was overkill when I ran a 2TB drive through 4 cycles once.

 

Just wondering, do most bad drives get discovered right away or do you find drives that looked perfect through 3+ preclears and then on the 4th, 5th, or 6th run suddenly look bad?

Link to comment

I preclear my new drives all the time for at least a 6-count through the script.  This means nothing short of about 10 days for a 2TB drive.

Holy #$)%!!  :o  And I thought that it was overkill when I ran a 2TB drive through 4 cycles once.

 

Just wondering, do most bad drives get discovered right away or do you find drives that looked perfect through 3+ preclears and then on the 4th, 5th, or 6th run suddenly look bad?

 

Yeah, as prostuff1 found out too, sometimes 2 or 3 passes has proven ineffectual for me.

 

I had a situation where I upgraded with three 2TB drives at the same time.  After I precleared them all for three passes (and they all stated they were all right), I ended up with an unprotected array not four weeks later as two drives failed simultaneously.

 

The failure was not catastrophic in that I could still recover most of the files from those two units, but I did spend an awful lot of time finding out which files were negatively affected.  I had to restore personal photos and documents from old copies on disused IDE drives in the end, as I hadn't had my backup unRAID box online until recently.

 

It was not fun, and so I do not play around any longer with new drives.  I put them through 6 cycles because I think it's about the mimimum number I can trust.  Even then, I only add one new drive every three weeks as a maximum (whether straight expansion or a drive replacement space upgrade makes no difference to this rule).

 

With 14.5TB of data now on my array I am no longer interested in hardware failure  ;)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.