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.

[SOLVED] Quick PreClear Question

Featured Replies

I just upgraded to the Plus version and purchased another 3TB HDD that should arrive today.  I just want to make sure I have the pre-clear correct because it's been a long time since I set up the array.

 

Can you run the pre-clear from a telnet session or should it be done by hooking up a keyboard and monitor to the server?

 

Steps to run preclear:

  • Stop Array
  • Power off server
  • Install new HDD
  • Boot server and log into web interface
  • Find drive letter of new HDD using serial number
  • Log into telnet session as "root" user
  • Type "./preclear_script.sh /dev/sdX" substituting "X" for drive letter in previous step

 

Is that correct?

I've run many preclears from Telnet sessions, works fine but don't let the PC you telnet from shutdown while the session is active.

 

Your steps sound about right but don't forget to include the "-A" attribute for any disks that need to be 4k sector aligned.

 

This may help refresh your knowledge :-

 

http://lime-technology.com/forum/index.php?topic=2817

  • Author

I'll have to look around and see if I can find out if my disk needs the "-a" attribute.  I saw that listed somewhere but haven't yet found a listing of what drives require that step.

 

I'm glad you told me about having to leave the telnet session up the entire time.  I would have probably just closed the session and expected that it would keep going on its own.

I'm glad you told me about having to leave the telnet session up the entire time.  I would have probably just closed the session and expected that it would keep going on its own.

 

Use screen to avoid that, and allow you to reconnect any session. 

I'll have to look around and see if I can find out if my disk needs the "-a" attribute.  I saw that listed somewhere but haven't yet found a listing of what drives require that step.

 

Any drive with "Advanced Format" in its specs will need the -A.

 

I'm glad you told me about having to leave the telnet session up the entire time.  I would have probably just closed the session and expected that it would keep going on its own.

 

The preclear might keep running but you would lose sight of the progress of each stage of the preclear process.  Considering a 2TB HDD takes 24hrs+ to run a single pass preclear you don't want to have to restart it if you can avoid it.

  • Author

 

Any drive with "Advanced Format" in its specs will need the -A.

 

The specs according to the manufacturer, or is this a screen in the web interface?  I ordered this 3TB Seagate Barracuda ST3000DM001

 

http://www.newegg.com/Product/Product.aspx?Item=N82E16822148844

 

Use screen to avoid that, and allow you to reconnect any session.

 

I just checked and I do have screen installed.  So if I follow the instructions here, I can close the telnet session after running the command, then reconnect to the session and run screen again to check on the progress?  Is there a command I have to enter to view the preclear progress, or does it automatically appear when I run screen?

 

http://lime-technology.com/wiki/index.php?title=Configuration_Tutorial#Preclearing_With_Screen

 

Thanks again for the help!

The specs according to the manufacturer, or is this a screen in the web interface?  I ordered this 3TB Seagate Barracuda ST3000DM001

 

http://www.newegg.com/Product/Product.aspx?Item=N82E16822148844

 

Manufacturer's specs, UnRAID's GUI won't tell you.  There is a warning at the start of the preclear but without knowing the drive's specs it's not much help.  I'd say your drive has 4K sectors based on the info in the Details tab :-

 

http://www.newegg.com/Product/Product.aspx?Item=N82E16822148844

You can also set the default alignment within the unRAID gui, which will preclude the requirement to add -A; regardless you can run -A on any drive.

type

screen -r

to resume a session after opening a telnet session

 

More commands:

http://kb.iu.edu/data/acuy.html

 

  • Author

So my command for the preclear will become:

 

./preclear_script.sh /dev/sdX -A

 

Substituting the drive designation for "X" in the web interface?

To invoke this script you simply list the name of a disk you wish cleared as an argument to the command, as in this example:

cd /boot

preclear_disk.sh -A /dev/sdX

 

where "X" is the designator for the drive you wish to preclear (double check! ;))

http://lime-technology.com/forum/index.php?topic=2817.0

 

 

 

 

  • Author

Awesome.  I have this written down for the next time.

 

cd /boot

screen

preclear_disk.sh -A /dev/sdX

 

Where "X" is the designator

 

I was going to start another thread, but I guess I can put it here.  I found this where it says you shouldn't fill up your drives.

 

http://lime-technology.com/wiki/index.php/Improving_unRAID_Performance#Avoid_filling_drives_.3E99.25

 

Unfortunately, I already have filled them up.  One 3TB only has 7.9GB free and shows as 100% full and the 2TB only has 9.5GB free and is also showing up as 100% full.  What's the easiest way to move some data from those drives to the new one once the drive is added to the array?

 

Can I just grab a couple movie folders, copy them to the desktop and then back again?  Do I have to change a setting somewhere telling unRAID that I don't want the drive filled past 95%?  I have been experiencing the pauses talked about in the Wiki article apparently due them being filled.

 

Now a note from the person who wrote the preclear script...

 

ONLY ONE DISK BENEFITS from the 4k alignment in improved performance, and that was the Western Digital EARS drive, and only if it did not have a jumper added to electrically add 1 to the sector being selected.  All other manufacturers and drive models can use any partitioning you desire without impacting performance.  Even the EARS drive will work just fine either way and odds are you'll never notice the lessor performance unless you are dealing with accessing tons of small files.  When accessing large media files, performance is more than sufficient to play music/movies, etc.  This whole issue is ONLY BECAUSE of that one model drive, and its performance because of its firmware/hardware solution.  (they elected to use a hardware jumper instead of having firmware that would work regardless of how the disk was partitioned)

 

ALL DISKS will work perfectly well using a partition aligned at a 4-k boundary, so you might as well use it.   

ALL DISKS that are greater than 2.2TB use GPT partitions... the GPT partition itself is aligned on a 4-k boundary, regardless of how you pre-clear it.  GPT partitioned disks will all also have a protective MBR partition defined starting on partition 1, to fool older utilities into thinking the entire disk is allocated.  That is by design.  Expect it if you attempt to learn the partitioning using older utilities.

 

So... with a 3TB drive (and anything over 2.2TB), it does not matter which option you use for the preclear script, as the "-a" or "-A" is entirely ignored.

Good luck with your new drive.

 

Joe L.

Thanks for clearing that up Joe, I was under the impression all 4K sector drives needed the -A.  I actually have a WD 2TB EARS drive that I was thinking of using to swap out a suspect drive, don't know if it has the jumper or not as it's currently in an external housing.  I'm assuming it's Ok to run a mix of non-4K and 4K sector drives in the same array?

I'm assuming it's Ok to run a mix of non-4K and 4K sector drives in the same array?

Yes.

All new drives can be formatted as 4k-aligned without penally. Set the option for 4K-aligned in the unRAID GUI and the don't use -a or -A.

 

  • Author

Well, my drive is in the Post-Read stage and will be ready for the array in a few hours.  I was looking over Joe L.'s preclear thread and have a question.  He has this listed in red at the bottom of the post:

 

Do NOT use anything other than the Format button on the main unRAID management console page to format a pre-cleared disk. The "Format" button will appear after you start the array after assigning a pre-cleared drive.  Do NOT format the drive on your own using a reiserfs linux command' date=' or using a button in unMENU, if you do, the pre-clear will be invalid, and you may even fool unRAID into thinking it is cleared when it is not.  This would let you think you have parity protection when you do not. [/quote']

 

If I'm understanding this correctly the "Format" button I'm looking for is the one when I log into the server using //tower and NOT when using //tower:8080.

 

Is that correct?

Correct.  In general, also a good practice to always go to the stock UI after making changes.

  • Author

Thanks again for all your help with my questions. 

 

Any thoughts on the easiest way to move data from the two currently full drives to the new one after it's added to the array?  Can I just cut a few movies from the array and then add them back?  I"m using High Water so I would assume that since the new drive has the least amount of space, everything would be written to that drive.

 

I found the "Min free space" option, but that seems to be share specific and not disk specific so I don't think that will do what I want.

First create your user share on the new disk.

 

Then...I would probably do a old disk-->new disk copy<using the disk shares> (If I'm making big changes I like to copy instead of move-just in case ;)), then a delete off the old disk.

 

You'll want that "min free space" once you start using the user share.

  • Author

I currently have 6 user shares on the array right now:

 

  • Misc Media
  • Movies
  • Music
  • Pictures
  • TV Shows
  • iTunes

 

Do I need to create all 6 of them?  Won't unRAID do that automatically once I try and copy something into the existing shares?  I'm not really sure how to create them though.  Sorry for the dumb questions, but other than the initial setup about a year ago, this thing has been completely self sufficient so I haven't really done a lot with it besides copying stuff from my desktop using windows explorer.

Believe you are correct. :)  I always just end up creating a top level folder<---that is your user share

 

<there was a bug in 4.7 that wouldn't use a new disk added to the share without a restart)

 

I assume you also have mapped the disk shares to windows explorer?

 

  • Author

I assume you also have mapped the disk shares to windows explorer?

 

I just created a shortcut on my desktop and pointed it to \\tower and access it that way when I want to add a movie or TV Show.

 

Here are some pictures of my shares and settings.  I only included the TV Show and Movies shares because I don't use the others very often.

Shares.JPG.73ceffb977e3bce26b4f219e0ee28662.JPG

Shares_2.JPG.60c5a69f34abb5923be87987acaa781c.JPG

Shares_-_Movies.JPG.c16873a13aa943c4ac7639dcb2f17d98.JPG

Shares_-_TV_Shows.JPG.cfea29970a8c22b054a00a973d76ea77.JPG

  • Author

Well, I think I broke it. 

 

After the preclear finished, I logged into my server using the //tower and stopped the array.  I added the new drive as Drive #3, but didn't get a format button.  I figured I had to start the array and noticed that there was a checkbox and a disclaimer staying that if the drive was not formatted that it would be formatted and the array taken offline.

 

I checked the box and hit start.  It said in the bottom left that it was preclearing my drive?!?!  Now I can't do anything.  If I try to open //tower, it just sits there.  Going to //tower:8080 and it says at the top PROTECTED_EXPANSION, unRAID ARRAY is STOPPED.

 

Is it preclearing my drive again?  Can I stop it and just add it to the array?

syslog-2012-06-13.txt

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.