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.

Empty disk is not empty

Featured Replies

Hi,

 

I have a disk that I want to remove from my unraid-server. I have excluded the disk from all shares and global share settings and moved all content to a new disk.

However, on the main-page, it looks like around 2 GB is still in use. I have gone through all folders on the disk (from the removed shares), and all of them are completely empty.

Is it safe to remove the disk, or are there any chance that there still is some data on that disk? And in that case - how should I find it?

 

Thanks.

 

 

  • Community Expert

That is probably normal filesystem usage. You can click on the folder in the View column in Main and it will show you what is on the disk. You will have to New Config without the disk and resync parity in order to remove it from the array. Please ask if you have any questions about this. Are all your other disks OK (no warnings on Dashboard) for the parity sync?

  • Author

Hi trurl

 

thanks for your reply. I thought 2GB was a lot just for filesystem?

Well all folders were empty both in "folder view" from the main page and in Krusader, so I deleted all the folders and added a new one called "clear-me" and it is now running the "clear an array drive" user script - it runs at less than 3MB/s which makes it over a week to clear a 2TB drive ?

Does my computer have to be turned on when the process is launched or is it just the first 60 seconds until it starts?

  • Community Expert

It shouldn't take nearly that long, you should post your diagnostics.

 

38 minutes ago, majbom said:

Does my computer have to be turned on when the process is launched or is it just the first 60 seconds until it starts?

 

Are you running the script from the webUI or from the command line?

 

  • Author
It shouldn't take nearly that long, you should post your diagnostics.
 
 
Are you running the script from the webUI or from the command line?
 
I'm running it from the webui. Shouldn't I do that?
How do I see the diagnostics?
49 minutes ago, majbom said:

Hi trurl

 

thanks for your reply. I thought 2GB was a lot just for filesystem?

Well all folders were empty both in "folder view" from the main page and in Krusader, so I deleted all the folders and added a new one called "clear-me" and it is now running the "clear an array drive" user script - it runs at less than 3MB/s which makes it over a week to clear a 2TB drive ?

Does my computer have to be turned on when the process is launched or is it just the first 60 seconds until it starts?

If you hit Run In Background, then  you should be ok to shutoff your computer.   If you hit "Run Script", then your mileage may vary as technically when the popup window closes the script does cease to execute.  However any long running commands (like the dd in the script) may or may not terminate when the window closes.

  • Author

Okay, now I have restarted the script (in background), but I'm no longer able to see how far it is.

I'm turning off my computer and see what it looks like tomorrow.

 

Thanks so far :)

Guys what about that command "screen" or something, I think you can login/logoff and activate the screen any time you want...I don't recall, it is like more than 15 years since I used Linux...

  • Community Expert
4 hours ago, Mat1926 said:

Guys what about that command "screen" or something, I think you can login/logoff and activate the screen any time you want...I don't recall, it is like more than 15 years since I used Linux...

 

Yes, "screen" would be the recommended way to do the script from the command line. Then you could disconnect and resume as you say.
"screen" is one of the things you can install from the NerdPack plugin.

  • 2 weeks later...
  • Author

The script ran for almost 14 days, and this message came up

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65018709 bytes) in /usr/local/emhttp/plugins/user.scripts/showLog.php on line 17

I dont get why it is so important to clear the disc when it's about to be removed anyway.

16 minutes ago, majbom said:

I dont get why it is so important to clear the disc when it's about to be removed anyway.

Because you implied that's what you wanted to do. If that's not what you wanted, then....

On 5/18/2018 at 8:58 AM, trurl said:

You will have to New Config without the disk and resync parity in order to remove it from the array.

 

  • Author

It was just the method I thought was the best when removing a disc. But I'll try the other one. Thanks.

 
  • Community Expert
31 minutes ago, majbom said:

I dont get why it is so important to clear the disc when it's about to be removed anyway.

 

I'll elaborate a bit on this so you might understand it better.

 

A disk that is all zeros has no effect on parity. When you add a disk to a new slot, it must be all zeros so parity will remain valid. If you don't preclear a disk unRAID will clear it when you add it to a new slot.

 

Similarly, if you want to remove a disk from the array and still have valid parity throughout, the disk must be written with all zeros while it is still in the array, so parity can be updated as that disk is written. Then, since it is all zeros, it can be removed without affecting parity.

 

Note that this is not really the usual method of removing a disk, but it does have certain advantages. You could think of it as an "advanced method". And the script was written by other unRAID users, not limetech, so in some sense it is not officially supported.

 

Even though the disk was "empty" it still had a filesystem on it. The filesystem on the disk, even though "empty", is not all zeros. It has a top level folder on it, and all the metadata the filesystem needs to allow you to add new folders and files.

 

The more usual method of removing a disk is just to New Config without it and let parity resync.

 

Everything about how unRAID operates makes much more sense if you understand parity. Here is a wiki:

 

https://lime-technology.com/wiki/UnRAID_6/Overview#Parity-Protected_Array

 

 

  • Author

It makes more sense to me now, thanks.
I thought that I had understand the parity system, but I don't know why I didn't thought that the parity was updated instantly but rather once in a while.

  • Author

Well, misfortunes rarely come singly. I have now tried to shutdown the array, to "change config", but it seems that a few docker-images hangs on shutdown :(

I have tried to shutdown/reboot from dashboard, but nothing happens.

Last I have tried shutdown from SSH, and now the webui refuses connection. The shares are still accessible, and I can still SSH into it.

What to do?

  • Author

I crossed my fingers and did a hard reset.

After that, I did "new config" and rebuild parity. Now it all works great.

 

Thank you for your help guys.

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.