Gico

Clear an unRAID Array Data Drive Script Takes Ages

11 posts in this topic Last Reply

Recommended Posts

Hi,

 

I am running the clear drive user script in order to shrink the array by one disk,

a 3TB TOSHIBA which it's reallocated sectors count increased 3 times (15-->19-->34) over the last few days,

although it passed an extended SMART test. This test took about 15 hours. Is this a normal duration?

 

"reconstruct write" is selected in the disk settings --> Tunable (md_write_method).

Clearing speed is ~1.1 MB/s, and based on the time it took to clear the 3rd giga byte (actually 1,000,000,000 bytes),

clearing 3,000 GBs will take about 50 days.

I know this script is supposed to take "a VERY long time!", but 50 days (???) or this drive is really fxxxed up?

 

The drive size shows at Main tab is 16.8GB. I know this odd behavior is expected,

but does it mean only 16.8 GBs have to be cleared? Don't blame me for trying to hang by a thread. 😀

 

BTW "reconstruct write" added only about 20% to the speed. I ran the script without this setting for about an hour, then restarted again with it.

 

  • Upvote 1

Share this post


Link to post
38 minutes ago, Gico said:

This test took about 15 hours. Is this a normal duration?

No, it should be much faster, likely related to the disk problems.

 

 

As for the slow script, I believe this has been reported the before, there might be an issue with it and latest unRAID releases, script author has been MIA for a while.

 

You can still do it manually:

 

1. If disable enable reconstruct write (aka turbo write): Settings -> Disk Settings -> Tunable (md_write_method)
2. Start array in Maintenance mode. (array will not be accessible during the clearing)
3. Identify which disk you're removing
4. From the command line type:

dd bs=1M if=/dev/zero of=/dev/mdX status=progress


replace X with the correct disk number, disk1=md1, disk2=md2 and so on
5. Wait, this will take a long time, about 2 to 3 hours per TB.
6. When the command completes, Stop array, go to Tools -> New Config -> Retain current configuration: All -> Apply
7. Go back to Main page, unassign the cleared device. * with dual parity disk order has to be maintained, including empty slot(s) *
8. Click checkbox "Parity is already valid.", and start the array

 

 

  • Like 1

Share this post


Link to post

Thanks. I will try this at night (family needs availability of the server 😁) and update tomorrow.

Share this post


Link to post

Drive is currently unmountable due to lack of file system.

Is it ok to leave it in this state or should I format it?

Share this post


Link to post
1 minute ago, Gico said:

Drive is currently unmountable due to lack of file system.

That's normal since you already started a clear, I assume your checking before starting as the clearing itself is done on maintenance mode, so no disks will be mounted.

Share this post


Link to post
7 hours ago, johnnie.black said:

dd bs=1M if=/dev/zero of=/dev/mdX status=progress

 

This above command but run without the bs=1M argument can be extremely slow. Maybe the script doesn't supply a big enough block size - then a fully working HDD can very well get a write speed as low as 1 MB/s.

Share this post


Link to post
3 minutes ago, pwm said:

 

This above command but run without the bs=1M argument can be extremely slow. Maybe the script doesn't supply a big enough block size - then a fully working HDD can very well get a write speed as low as 1 MB/s.

 

Script uses the same byte size, but I believe other users before had the same issue, so there might be something that doesn't work well with latest unRAID releases.

Share this post


Link to post
Posted (edited)

Running this command standalone made quite a difference. It started at 160 MB/s, and ended at 131 MB/s.

However I saw this morning it had an error, and I don't know what that means in regard with the array parity.

How to proceed? As planned + parity check?

2018-07-10_07-36-02.jpg

Edited by Gico

Share this post


Link to post
1 hour ago, Gico said:

However I saw this morning it had an error, and I don't know what that means in regard with the array parity.


What error did you get? Or did you mean the "No space left on device" error? dd isn't given a request to write a specific amount of information - it's ordered to keep writing until it fails because it reaches the end of the disk. So the "No space left on device" message isn't a real error but an expected message.

  • Like 1

Share this post


Link to post

Yes, I meant "No space left on device".

OK thanks. Started the array with new config, Disk 8 unassigned, and began a parity check. So far looks good.

Share this post


Link to post

Parity check ended without errors.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Copyright © 2005-2018 Lime Technology, Inc.
unRAID® is a registered trademark of Lime Technology, Inc.