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 is taking too long

Featured Replies

Hi,

I'm following the steps from the "Clear Drive Then Remove Drive" Method from this guide https://wiki.unraid.net/index.php?title=Shrink_array#The_.22Clear_Drive_Then_Remove_Drive.22_Method to reduce the size of my array.

I decided to clear a 1TB SSD, so I started the script last night. It is now morning and the script is not done and I see that it is still writing to the disk and the parity drive.

Should I stop the script? It's been like 10 hours.

 

Thanks :)

Probably not. How fast is it writing? What's your setup? What kind of drives? Reconstruct writes enabled? It's an SSD but if it's part of a parity-protected array writing to it will still be limited to the slowest drive in the array at best, or less without reconstruct writes enabled.

Edited by Kilrah

  • Author

Hi,

I enabled reconstructed write. The array consists of 3 data drives and 1 parity drive. All of them (including parity) are 2TB except for the SSD that I'm clearing which is 1TB. The parity drive is a WD Red drive (I think it's SMR), but even if it was slow, I would have expected it to complete by now. What do you think?

image.thumb.png.c7c1ff48531b57a1dac20cc64ccc1e37.png

Click on this to see how fast it's going instead of the useless number of IO.

 

image.png.05960d19cf1e4ac6e8ea9e8c910992ce.png

 

Also what's the script output so far? It seems the actual clearing might not have even been started.

Edited by Kilrah

  • Author

Hmm, could be, but I do see the drive getting hit

image.thumb.png.01d34038d06a598ff7df4650256e5dc5.png

But the script doesn't say much

image.thumb.png.14886b303718027855e5c3bf5244c829.png

At 50MB/s it would take about 5.5 hours, if you had reconstruct write off before it might have been even slower then.

But the script mentions it failed to unmount the disk, so that may be a problem. Did you still have shares set to use it, or a shell open in it when you ran the script?

Edited by Kilrah

2 hours ago, JorgeB said:

That script doesn't work correctly with latest releases

I've used it without issues 2 days ago on 6.11.0 - not from the user scripts plugin though

 

image.png.fe4f21df92a287df09a826cf172ebe9e.png

 

Edited by Kilrah

3 minutes ago, Kilrah said:

not from the user scripts plugin though

Could be because of that, I know that there have been multiple reports of the script being really slow.

The script does a du -s on each disk to check whether it's empty, that can take quite a while depending on what you have on your drives. But that's before the confirmation prompt so OP is past that, after that all it does is unmount the disk and the same dd you'd do manually so it's just limited to the array's write performance.

 

In my case I've commented out the du since it would probably have taken hours with my drive contents. Script should ideally check for marker first and only do a du to check if it's empty on drives that have it already instead of all of them.

The complain has been the clearing speed, like 5 or 10MB/s even with reconstruct write enabled.

5 minutes ago, JorgeB said:

The complain has been the clearing speed, like 5 or 10MB/s even with reconstruct write enabled.

 

It runs exactly the same command you have in your post about doing it manually. If it's slow it's the array being slow :)

My guess would be those who have terrible performance have it because of SMR drives, it is a large write operation after all. Or concurrent accesses.

Edited by Kilrah

  • Author

Perhaps it was a problem with the user scripts environment or the fact that it was an SSD? Anyway, I got worried about the SSD health, so I aborted the script.

Unfortunately, the disk writes didn't stop (turns out that the write command was still running in the background). I tried killing it, but the writes didn't stop. I tried rebooting, but the reboot button didn't work, so I had to do it from the terminal.

In the end, since the disk was empty, I decided to shrink my array using the traditional method of rebuilding the parity, which is happening right now (hopefully that will actually finish).

Thanks for the help :)

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...

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.