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.

Clear an unRAID Array Data Drive Script Takes Ages

Featured Replies

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.

 

  • Community Expert
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

 

 

  • Author

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

  • Author

Drive is currently unmountable due to lack of file system.

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

  • Community Expert
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.

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.

  • Community Expert
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.

  • Author

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

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.

  • Author

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.

  • Author

Parity check ended without errors.

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.