Clear an unRAID Array Data Drive Script Takes Ages


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
Link to comment
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 2
Link to comment
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.

Link to comment
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.

Link to comment

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
Link to comment
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
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.