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.

New version of preclear_disk.sh for Advanced Format drives in unRAID 4.7 onward

Featured Replies

  • Author

I cant find what is the command to stop current preclear? I cant seam to find it. One of my EARS drives has stopped on 3% of pre-read while other 2 are preclearing..

Control-C

(Hold control key down and press the letter "c")

  • Replies 62
  • Views 19.8k
  • Created
  • Last Reply

Since I am pre clearing a brand new 2tb ears drive anyway, if I want to clear my other non ears drives that have already been precleared using the old script I can just run the -C command to convert them over or do I need to run dd if=/dev/zero count=8 of=/dev/sdX ? They had data on them but I deleted so they are empty now, they are the seagate 2tb LP drives that have the new firm ware update.

  • Author

Since I am pre clearing a brand new 2tb ears drive anyway, if I want to clear my other non ears drives that have already been precleared using the old script I can just run the -C command to convert them over or do I need to run dd if=/dev/zero count=8 of=/dev/sdX ? They had data on them but I deleted so they are empty now, they are the seagate 2tb LP drives that have the new firm ware update.

For any non-ears drive, you can just run the new preclear_script.sh command on them.

If they have NEVER been assigned to the array since they were pre-cleared, then you can use the "-C" option to convert them to a partition starting on sector 64. 

 

Don't worry, if the drive does not still have a pre-clear signature, the "-C" option will tell you it cannot be converted.

 

Deleting the data from a drive does not clear them.  All it does is delete the directory entries pointing to the files.  The formatting and files are mostly still there, just no way to get to them.

 

The newest version (1.3) of the preclear script was uploaded just a few minutes ago.  Get it from the first post in the original thread before you do another disk.  The final reports keep getting smarter as I see what it does on various disks.

 

Joe L.

 

 

Joe ur killing me in a good way  :). I really do appreciate your help and what you do for the community. Ok the drives were assigned to the array. I added the other drive and moved some others around and evidently got the cables mixed up. I have unassigned all the drives and I am getting ready to install the new preclear script. Then I am going to pre clear all the drives again using the new script except for the other ears drive that already has the jumper installed and precleared using the old script. At this point I am pretty much back to square one with no data currently on any of the disks. Since you are the master of all that is pre clear. Should I pull the jumper on the last drive and run the dd if=/dev/zero count=8 of=/dev/sdX or leave it alone? Also should I try and plug the cables back in the right drives or since I am starting over just leave them. Thanks again. And when I am done this time I am leaving it alone.

Ok I am going for it. I removed the jumper and I am going to run dd if=/dev/zero count=8 of=/dev/sdX. Should I run the same command on all the drives as well since they were part of some kind of array? Or just the old ears that had the jumper?

  • Author

Just the EARS drives that have had the jumper changed, or any drive where you want to change the partition start and let unRaid clear and partition the drive based on the default you set on the settings page.

 

joe L.

Doing it now. Thanks.

I am currently running two preclears. One is going quite well running at about 100Mb/s the other is acting odd going very slow about 14 Mb/s and seems to just stop for awhile. I then looked at my syslog and am getting a bunch of errors that look like this.

 

Feb 1 14:48:13 Tower kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }

Feb 1 14:48:13 Tower kernel: hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=16, sector=0

Feb 1 14:48:13 Tower kernel: hda: possibly failed opcode: 0x25

Feb 1 14:48:13 Tower kernel: end_request: I/O error, dev hda, sector 0

Feb 1 14:48:34 Tower kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }

Feb 1 14:48:34 Tower kernel: hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=16, sector=0

Feb 1 14:48:34 Tower kernel: hda: possibly failed opcode: 0x25

Feb 1 14:48:34 Tower kernel: end_request: I/O error, dev hda, sector 0

 

Any ideas?

  • Author

yes, the disk is not working correctly.

 

lol, ok is there a way to stop the preclearing

Control-C

(Hold control key down and press the letter "c")

  • Author

lol, ok is there a way to stop the preclearing

Sure... Type

Control-C

(Hold the control key down, press the letter "c")

in the window with the preclear process.

 

It could be a loose cable, or a defective drive, or a bad disk controller port, or a power supply unable to keep up with the disks, or an EARS drive that has mis-reported its geometry and the preclear tried to access a sector that does not exist.   Often it will take a complete power cycle to get an EARS drive to start responding again once it has locked up.

  • Author

I thought that I read this somewhere...With the newest version of the preclear, does it automatically save the results with the name of the disk? Maybe I was reading something else.

Version 1.3 of the preclear script does automatically save the reports to the flash drive in a preclear_reports subdirectory.  They are date stamped too. 

In order to get preclear_disk.sh to work on the SATA drives on my LSI1068e card, I had to delete every single  "-d ata" parameter option to smartctl in the script. After doing so, it worked perfectly fine for drives on the LSI1068E and motherboard SATA ports. On unRAID 5.0beta3 the system/smartctl seems smart enough to get things right.

  • Author

I guess I'll need to add an option so you can omit the -d ata when not needed.

 

Joe L.

  • Author

I guess I'll need to add an option so you can omit the -d ata when not needed.

 

Joe L.

There is now two new options to preclear_disk.sh

 

# Version 1.4  - Added "-D" option to suppress use of "-d ata" on smartctl commands

#                Added "-d device_type" to allow use of alternate device_types as arguments to smartctl.

 

No need to modify the script any longer.  You can use

preclear_disk.sh -D /dev/sdX

and the "-d ata" will not be used when issuing the smartctl commands.

 

At the same time, for others, I also added the

"-d device_type"

option, so if you had a different device that was supported by smartctl, you could specify the "device_type",

for example (for a scsi device):

preclear_disk.sh -d scsi /dev/sdX

(note, unRAID may not support a SCSI device, don't know if anybody has ever tried, but you'll be able to preclear it)

 

It should help you and others with similar hardware who follow.  The added options make the command more versatile.

 

Thanks for the feedback.

 

Joe L.

Bless your soul Joe L, you're a good man!

 

  • Author

Version 1.6 of preclear_disk.sh has now been released.

 

The newest unRAID 5.0beta made changes to the format of the config/disk.cfg file that broke the "-l" option of preclear_disk.sh.

 

Version 1.6 of preclear_disk.sh may be used with both older and newer versions of unRAID.

 

Have fun.

 

Joe L.

Version 1.6 of preclear_disk.sh has now been released.

 

The newest unRAID 5.0beta made changes to the format of the config/disk.cfg file that broke the "-l" option of preclear_disk.sh.

 

Version 1.6 of preclear_disk.sh may be used with both older and newer versions of unRAID.

 

Have fun.

 

Joe L.

 

My flashdisk is wearing out overwriting my preclear script with all these new versions. :D :D :D :D

Version 1.6 of preclear_disk.sh has now been released.

 

The newest unRAID 5.0beta made changes to the format of the config/disk.cfg file that broke the "-l" option of preclear_disk.sh.

 

Version 1.6 of preclear_disk.sh may be used with both older and newer versions of unRAID.

 

Have fun.

 

Joe L.

 

My flashdisk is wearing out overwriting my preclear script with all these new versions. :D :D :D :D

 

I was thinking same :)

downloaded 3 in last weeks and didn't use one yet LOL

waiting for beta 4 now to see if there are not too many issues and then to jump to the new beta

and then finally preclear my new 2tb drive with AF

  • Author

Version 1.6 of preclear_disk.sh has now been released.

 

The newest unRAID 5.0beta made changes to the format of the config/disk.cfg file that broke the "-l" option of preclear_disk.sh.

 

Version 1.6 of preclear_disk.sh may be used with both older and newer versions of unRAID.

 

Have fun.

 

Joe L.

 

My flashdisk is wearing out overwriting my preclear script with all these new versions. :D :D :D :D

How do you think I feel?  The letter "z" on my keyboard is almost worn out from all the .zip files I've been forced to make.  ;)

 

I guess I need to work on my psychic abilities... to better anticipate future structure changes in system files.  ???

 

Looking into my crystal ball.... and incantating something about awk/bash/sed/unRAID, makes me want to add another feature or two... ;D

 

Oh yes... I've also got to find time to try out the new beta version... I'm one of the lucky ones with a backup unRAID server with a full duplicate set of my data.  I can risk it for the beta versions and recover if I/it do something really stupid.

 

Joe L.

Version 1.6 of preclear_disk.sh has now been released.

 

The newest unRAID 5.0beta made changes to the format of the config/disk.cfg file that broke the "-l" option of preclear_disk.sh.

 

Version 1.6 of preclear_disk.sh may be used with both older and newer versions of unRAID.

 

Have fun.

 

Joe L.

 

My flashdisk is wearing out overwriting my preclear script with all these new versions. :D :D :D :D

How do you think I feel?  The letter "z" on my keyboard is almost worn out from all the .zip files I've been forced to make.  ;)

 

I guess I need to work on my psychic abilities... to better anticipate future structure changes in system files.   ???

 

Looking into my crystal ball.... and incantating something about awk/bash/sed/unRAID, makes me want to add another feature or two... ;D

 

Oh yes... I've also got to find time to try out the new beta version... I'm one of the lucky ones with a backup unRAID server with a full duplicate set of my data.  I can risk it for the beta versions and recover if I/it do something really stupid.

 

Joe L.

 

Sorry to hear about the "z" key failure.  I'm assuming you already checked your SMART report to see that it wasn't remapped to the F13 key.  Your "e" and "r" keys must have better cooling, since they would be used twice as much in pREclEaR.zip.  Perhaps you could call the file .RIP instead of .ZIP?  On your next keyboard I'd suggest using the preclick_keyboard.sh script with the newly added "-Z" (not -z) option, to include randomized "z" key presses during the post-click phase.

 

Newegg shell shocker deal for today is the new PCIe x32 crystal ball.  Expired yesterday though.  Oh well, catch 22.

 

Good luck with that 5.0b4 testing with no 'z' key or crystal ball.

 

:D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

  • 2 months later...

I'm going through the configuration tutorial and am in the process of preclearing my 3 hard drives... where can we make suggestions to the Configuration Tutorial? It is mentioned to suggest improvements for clarity but I don't know where to do that.

 

Some suggestions:

  • Explain what 4K-aligned means and its advantages. From reading the forums, it seems to help performance... that's all I know about it ;)
  • Suggest to set in Settings page, Disk Settings > Default partition format: to MBR: 4K-aligned so that when you invoke the preclear script as written in the tutorial, it will default to 4K-aligned instead of having to type the -A flag, which you wouldn't know about unless you read the forum ;)
  • Note that running preclear on several drives saves you time compared to running them individually and waiting for each drive to preclear one at a time. I thought it would be faster to do one at a time and then started the preclear on the other drives just to see what would happen and all 3 drives were reading at over 100MB/s during the Disk Pre-Read. So you should install Screen and run all preclears simultaneously!

 

Thank you to all those who wrote the Configuration Tutorial!!! It is helping my unRaid server get up on its feet.

  • 3 weeks later...

I have a 2TB EARS drive that I intend to use for parity, but it came without a jumper, so I don't have a jumper on 7-8. Is it correct to preclear with the -A option? Would I end up with slow performance on this drive?

You do NOT want a jumper if you use the -A option. This will give best performance.

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.