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.

How to find my way to (and delete) folders in my shares via Terminal

Featured Replies

OK - so it looks like I am not going to get any help re recovering my unRaid system from the apparent sequential loss of a couple of drives and so I guess that I have to move to stage 2 - recovering what I can from the situation. Thanks anyway.

 

I have been able to work out what files have been lost and so now want to delete the folders that contained them and start rebuilding/reobtaining the lost files. Unfortunately whenever I try to delete the now empty folders via access from my Mac I get a “The operation can’t be completed because you don’t have permission to access some of the items”. Have run “new permissions” from unRaid but still get the same error message.

 

Could somebody advise how I can delete from Apple Terminal - I can access the unRaid server via Telnet command but after that I cannot work out where my, say, Movies or Photos folders are. Have tried for an hour or two to work this out but have failed miserably. So could somebody advise the commands to use to a) get to the Shares folders via Telnet and then b) to delete a folder that is now empty due to my failed drive(s)

 

As usual - thanks in anticipation of some help /advice

 

You should find your shares in the /mnt/user directory

You may find it easier to do things from the telnet session.  If you use the 'mc' command to start Midnight Commander you get a reasonably friendly interface for manipulating files on the unRAID server.

 

I am not quite sure what is the current state of your unRAID system.  unRAID cannot automatically recover once you have more than one drive failed, but in practise it is common for the failure to have been an external factor and the drives are physically fine so all their data can be recovered if you go about it properly.  Are the 'failed' drives still in the system or not at this point?

  • Author

Great - thanks Scottc- have now found them (cd /mnt/user/Movies for example) so thank you! However when I try to delete the folders that used to contain the lost files (rmdir) then I get error messages because the folder contains read only items. I've tried sudo commands and even tried via Midnight Commander to remove the locked items but they will not delete. I've now run reiserfsck on the drive that seems to contain these locked files but have received the message "24 corruptions can be fixed only when running with --rebuilt-tree.

 

Re Itimpi - thanks - I think that you are right - the two failed drives were probably one failed and one dislodged when replacing the failed one (I posted Smart info on Friday but nobody responded) (and yes - I have the two faulty drives but they are not in the system as I replaced them with larger drives when I was attempting to respond to the failure reports). In the absence of any help from the community I have given up trying to work out what to do and so have worked out (I think) what has been lost and so am trying to delete the folders that contained the lost files - but that is when the locked error messages arise. I am just pressing the trigger on --rebuild-tree on one of the replacement drives. Sounds dangerous and so any help from this point is very very very welcome. Runsa fix-fixable and it states that I have to do a --rebuild-tree (getting frightened!!)

 

Sorry, I was on vacation (still am) and missed getting back on your other thread, which I just reviewed. If I understand correctly, you rebuilt 2 disks but the results are probably corrupt. And you still have the originals, but they are not currently installed.

 

The problems you are having with deleting may be due to the corrupt file systems.

 

You could try to repair the rebuilds, and also try to repair the originals, and between all of these disks, maybe you could get some of your files back. Or at least be able to delete like you want.

 

Sounds like you are running reiserfsck on the rebuilds now. That seems reasonable. Are you running reiserfsck on the md devices or on the sd partitions? What is the exact command?

 

 

  • Author

Hi  - thanks for getting back to me whilst you are on holiday - really appreciated!

Here is my current status:

I have 9 disks in my array. I got an unRaid email about errors on disk 8 (2TB)- it was red-dotted.

I replaced it with a 3TB and set it to rebuild - rebuild reported to complete OK but disk 4 (2TB) flagged millions of errors and so (in retrospect) was probably dislodged whilst replacing disk 8. I replaced this with another 3TB and this time rebuilt disk 4. This raised some worries as even though UnRaid reported that rebuild had completed, I was invited to format the disk (even though it had formatted - I think - at the start of this second rebuild process).

I have both of the "Faulty" drives (probably one faulty and not the other) and posted the Smart reports as requested but since I didn't get any responses I assumed that I was on my own and so decided that only option remaining to me was to work out what I had lost and remove these files/empty folder and start to attempt to replace the lost files from elsewhere.

This is when I found out that I could not delete the folders that used to contain the lost files - so have run "reiserfsck --check /dev/md8" plus "reiserfsck --fix-fixable /dev/md8" and finally (just completed) "reiserfsck --rebuild-tree /dev/md8" (thousands of errors "fixed"_

So - maybe I have been too impatient and perhaps have lost any chance of going back to my original server state - or maybe there is still a chance (but, of course, I have clearly been meddling quite a bit!)

Happy to take what help I can get - either by simply removing the bits and pieces of the files that I have lost or by attempting to go back to the state that I was in when the server first complained?

Thanks in anticipation

 

Re Itimpi - thanks - I think that you are right - the two failed drives were probably one failed and one dislodged when replacing the failed one (I posted Smart info on Friday but nobody responded) (and yes - I have the two faulty drives but they are not in the system as I replaced them with larger drives when I was attempting to respond to the failure reports). In the absence of any help from the community I have given up trying to work out what to do and so have worked out (I think) what has been lost and so am trying to delete the folders that contained the lost files - but that is when the locked error messages arise. I am just pressing the trigger on --rebuild-tree on one of the replacement drives. Sounds dangerous and so any help from this point is very very very welcome. Runsa fix-fixable and it states that I have to do a --rebuild-tree (getting frightened!!)

If still have the original drives, then it is very likely that you can plug them into the unRAID server (assuming you have somewhere to plug them) and recover all the data.

 

For each drive you first want to run:

reiserfsck --check /dev/sd?1

where sd? is the identifier shown for the drive in the GUI.  Do not forget the '1' at the end specifying the partition.

 

It is likely that doing the above will tell that there is corruption and to repair it you need to run reiserfsck with --rebuild-tree.  You would therefore use:

reiserfsck --rebuild-tree /dev/sd?1

to repair the file system.

 

Assuming the above go OK, then you can then mount the drives to copy off the files back to the array.

  • Author

Great - I can shut down the server and remove the Cache drive temp. and replace the cache drive bay with the faulty drives in turn and run the commands .. would I mount each faulty drive in maintenance mode as an additional drive to the 9 drives in my array (i.e. disk 10) or would this get me into deeper water?! (I can't work out how I would access the cache drive mount via the reiserfsck commands)

Thanks

 

  • Author

Oh dear - got myself into even more of a pickle - I know enough about this sort of stuff to be dangerous .. and that's what I have become.. dangerous!  :'(

 

Once the reiserfsck --rebuild-tree /dev/md8 command had completed I thought that I should restart the array in normal (non maintenance) mode and check whether I could now delete the folders that I couldn't previously delete. It now seems that I have done something terrible to my "Movies" share?! .. I can see it and the contents via the unRaid control panel and via Telnet too - BUT my Mac can't see it any more and if I double click on the "Movies" share I get the message "The operation can’t be completed because the original item for “Movies” can’t be found.".

 

Now really very very worried - have I lost everything or does the share/contents still exist and I simply have to do something clever to make the Mac see it again?!

 

Help? Anyone? Please? Thanks!

 

 

Unmount & remount the share should resolve it

  • Author

Phew - feel a little stupid - but thanks! Its worked! Phew - been sweating over this drive failure thing for almost a couple of weeks so quite edgy/un-cool about stuff! Really appreciate such quick response. OK - can now make a bit more progress I think!

Thanks

 

Great - I can shut down the server and remove the Cache drive temp. and replace the cache drive bay with the faulty drives in turn and run the commands .. would I mount each faulty drive in maintenance mode as an additional drive to the 9 drives in my array (i.e. disk 10) or would this get me into deeper water?! (I can't work out how I would access the cache drive mount via the reiserfsck commands)

You do not need to be in Maintenance mode as these drives are not part of the array.

 

On v6 I would have suggested using the Unassigned Devices plugin to manage these drives which are not under unRAID control.  However that does not exist on v5, but I think that the SNAP plugin might be an alternative for v5.  Anyone still using v5 able to comment on this?

  • Author

OK - thanks - have just found and installed Snap so about to reboot and will see if I can make sense of it! Hope so - thanks again!

 

  • 3 weeks later...
  • Author

OK - been out of circulation for a while (long business trip followed by a holiday) .. just need a little more help to get me over the line. Hope somebody can advise.

I've used Snap and mounted one of the faulty drives via a USB caddy. It appears as "sdm" when I look at it via UnMenu

I'm running Reiserfs on it at the moment! Seems that it is not as faulty as I thought - no significant error messages.

 

Here's the question - could anyone advise how I can mount the drive and copy over any of the contents that are still OK?

I can't mount it as part of the array of course ... so what else can I do? Ideally l'd like to mount so that I can see it from my Mac and drag/drop in-tact files off it .. but if thats not possible then I guess I will have to try to learn a little of Midnight commander?!

 

Any advice gratefully received

Thanks in anticipation

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.