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.

Removing a drive from the array safely

Featured Replies

I am in the process of loading data onto a newly constructed unRAID media server. As such I’ve successfully added seven disks to my array and copied a lot of data over. I have NOT yet implemented a parity drive. During an operation copying a group of files from my Windows machine to the unRAID server I had some kind of error (the system was unattended at the time). The end result is that I wound up with two folders on disk3 of my array that have some sort of phantom or ghost files in them. unRAID shows all the drives as green. Everything seems fine except for these empty folders containing these phantom files.

 

From the Windows perspective I have a top level directory (one level below the share itself) that has two empty folders that cannot be removed. From the terminal's perspective, I can't gain access to what's inside these folders.

 

Here’s what I’d like to do:

1. Copy the data on disk 3 either back to an empty disk on my PC or, alternatively copy them directly on the unRAID server from the physical disk 3 to one of the other physical disks if this is legit and faster.

2. Remove disk 3 from the array.

3. Preclear disk 3 again.

4. re-assign it back into the array.

 

 

Three questions:

 

 

 

1. I’m unclear how to safely remove a disk from the array. Is it as simple as just stopping the array an unassigning it, or are there other operations I need to perform? I keep reading about Initconfig but I don’t know if it is required and if so, what the appropriate syntax or parameters are.

 

2. Is it safe to copy files directly from one physical disk in an array to another. Will unRAID deal with the results without complaining? If so it might be faster.

 

3. In either case is it necessary to preclear disk 3 again or is there a quicker way to perhaps just reformat it?

 

Thanks for any help

cd to the directory and enter ls -a

 

Why not delete the folder/files in the terminal?

  • Author

I'm not very familiar with linux but I did cd to the directory and tried "ls -a". The response I get is "permission denied." which is what I got previously. I'm attaching a screen grab of the session. If there is a way to do it, I'm game but I kind of concluded that I couldn't get to it and that's why I developed the alternative scenarios.

 

Thanks.

Terminal_session2.JPG.2b2343f17628886df4715556587eed30.JPG

  • Author

wouldn't that remove everything that is in the media folder, not just the offending folders?

  • Author

Ok. I think I figured out what you were suggesting. (sorry but I'm petrified of screwing things up from the command line) I navigated to the directory containing the phantom file and attempted to remove it by typing in "rm -rf Slings\ and\Arrows.S03e06.Bluray.mkv" it replied "rm: cannot remove 'Slings and Arrows.S03e06.mkv': Permission denied."

  • Author

Ok. I did that. I just get permission denied again. Screen grab attached.

Terminal_session_3.JPG.4edc2c471bb5443c6f79a93d11c7a5d6.JPG

Ok. I did that. I just get permission denied again. Screen grab attached.

 

Try giving yourself permissions first. The -R switch makes the chmod command recursive. I would do a chmod -R 770 foldername or even a 774. Since your plan is to delete it really doesn't matter. It may be even easier to just see what permissions are at a higher level and apply the same throughout. Start with one file to test.

 

Look this this link. It explains chmod better than I could.

 

http://www.linuxcommand.org/lts0070.php

 

After the chmod completes try the ls again. You should have rights and rm should work at that point. If not post your results.

  • Author

Thanks, but I'm afraid that didn't help either (screen shot attached). But also thanks for the link. At least I learned something that will come in handy down the road.

 

Is there anything further to suggest, or do I need to proceed with removing the drive from the array. (I've already copied all the files to a drive back on my PC, so I'm ready to go)

 

If so, do you know anything about the initconfig command that is applicable when removing a drive before you have parity protection. Everything I've found initconfig talks about it in the context of removing a drive from a parity protected system. It seems like it should work the same without parity but I'd sure like confirmation, on how to proceed, particulary since the drive I'd need to remove is in the middle of disk assignments (disk3 of 7 disks) and I'm not clear on whether or how to reassign the remaining drives.

 

Thanks for your help!

Terminal_session_4.JPG.391cf34a83e6b36c3a34bbab5134c709.JPG

What does the following show:

 

whoami

 

ls -l /mnt/disk3

 

ls -l /mnt/disk3/Import\ D006

 

 

  • Author

See attached. I had to modify your suggested command because the directory structure is actually: mnt/disk3/media/Import\ D006. I presume that is what you meant.

 

Just to hazard a totally uneducated guess, but from what I read earlier today, is it possible it doesn't see "root" as the owner of the directory, since it appears to be saying (at least to my ignorant eyes) that "root" has privileges but "other users" do not?

 

Anyway thanks again for the help.

Terminal_session_5.JPG.c3b40d7d93c003a9fb7ed550be454de6.JPG

This looks like file system corruption. Since the contents of the disk are backed-up you can stop the array, take a screenshot of the disk assignments, unassign the disk, and enter initconfig. Parity will then need to be rebuilt, the disk re-added, and the backed-up contents restored. It may be faster to run reiserfsk: http://lime-technology.com/wiki/index.php?title=Check_Disk_Filesystems

It seems too easy to corrupt a whole file system, no?

 

 

No it does not. It's never happened to me and several things can cause it. Don't forget this is a support forum containing posts by the small minority of people having problems. Most unRAID people never have file system problems. Most unRAID users never post because they are having no problems.

  • Author

Tried reiserfsck. It seems to have reported nothing significant, from what I can see. Text file attached.

 

I think I'll just go ahead, unassign the drive, and recopy the data from my backup. I'll also run preclear again on the removed drive and assuming all is well then add it back to the array.

 

 

 

  • Author

Sorry :-[

 

Here it is.

 

Anyway I've gone ahead and removed the disk from the array. Copying files back to the array right now. All seems to be well. Then, I guess, I'll need to run preclear on the disk again, before putting it back in the array.

 

Thanks for the assistance. At least I now have what looks like a good reference to learn more about linux commands.

 

reiserfsck.txt

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.