Jump to content

Removing a drive from the array safely


Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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.

 

 

 

Link to comment

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

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...