Can't delete certain files


Recommended Posts

I'm trying to remove a disk that's starting to go bad from the array.  Before I do that, I'm trying to copy everything from the disk to the rest of the array with Unbalance.  That worked, sorta.

 

I've got one specific directory in which there are 20 or so files that don't move.  In the end I started midnight commander via a terminal window and tried like that, but it says : "Cannot stat "filename" - No such file or directory".  All the files are now in red with a question mark as the first character in their filename. 

 

Is there a way to get rid of these files, or is this the result of what Unraid started to report - disk errors and the disk going bad?

 

It's not a huge problem, I still have those files stored elsewhere, but I'm just wondering.

 

Thanks!

Link to comment

I've found that the most reliable way to get rid of obstinate files is via the command line.

 

SSH into your unRaid system as root and navigate to the directory in question.

 

To see all files, including invisible, with extended info, issue;

 

ls -a -l

 

Then, from within the directory;

 

rm -r -f *

 

(be super careful with that one, it's force remove all files in the current directory, including all files and folders within folders - issuing that in the wrong place can wipe drives)

 

If that doesn't work, you may need more expert guidance that I can give.

Link to comment

No.  They don't even show up in explorer. Nor in Unraid, when I click though the folder view directly on the disk (on the "main" tab).  Strangely enough, Unraid does not say "no files", but rather "No listing: Too many files" (but doesn't show any).

 

Edit : nevermind, I was going to remove this disk anyway, and now I did.  Guess I'll never know what happened, but it doesn't matter also.

Edited by BartDG
Link to comment

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.