Recommended Posts

So I totally fat fingered in the terminal window and was attempting to delete files within the directory I was in however I realized after 2 seconds that I was deleting everything from the base path.  I killed the command, however I noticed that the damage has already been done and have wiped out my /flash directory.  I am able to navigate to the tower via ip, however none of the tabs actually load anything.  Everything works at the moment however I fear the moment I attempt to do a clean restart, that nothing will work.

Is there a way to recover from my fat fingers and somehow restore the contents of my /flash directory?

Link to comment

I wouldn't necessarily think flash was deleted. More likely you have just deleted some of the OS files in RAM.

 

Unraid unpacks the OS fresh from the archives on flash at each boot into RAM. All the OS files starting at / are actually in RAM. Maybe the command didn't actually get far enough to touch the flash mounted at /boot or any of your data mounted at /mnt.

 

You should always keep a current copy of flash in any case. For future reference, you can download a zipped copy of flash at any time from Main - Boot Device - Flash - Flash Backup.

 

Nothing really for you to do now but reboot so the OS can be restored from the archives on flash. If you want you can put flash in your PC to check if it's all still there. As long as the config folder on flash is intact or has a backup it is very easy to recover from a flash problem.

 

Link to comment

Thanks for the info.  I do have a copy of my /flash directory, however it's from ages ago. :(

Definitely need to be better about backing that up as well!

 

I was able to stop it as it was chewing through /mnt/appdata for some of my docker apps.  But assuming it goes alphabetically, it definitely went through my /boot folder and now nothing shows up in the samba share.

 

 

Link to comment
2 minutes ago, mike_j_jensen said:

I do have a copy of my /flash directory, however it's from ages ago. :(

The very most important thing is knowing your disk assignments. If you had a recent copy of flash then you wouldn't need to worry about that since those are stored in that config folder I mentioned.

 

You must be absolutely sure you don't assign a data disk to the parity slot or it will be overwritten.

 

Beyond that, I don't know how much of what you have on that old flash will be useful to you. Your license .key file is also in that config folder, so there is that. And all of your shares will still exist simply because they are just the top level folders on all your disks. But if their .cfg files aren't there they will have default settings.

 

Probably the main thing you don't want to hear is that all of your docker settings are on flash. Any appdata that survived might still be OK but you will have to setup those dockers again anyway and point them to that appdata.

Link to comment
8 minutes ago, mike_j_jensen said:

it was chewing through /mnt/appdata

And technically this is wrong also. What makes you think it was chewing through appdata? That folder is actually on one of your disks. It is at /mnt/user/appdata (assuming you did it correctly), but it would get to its path on the actual disk first if it is going alphabetically. If it is /mnt/cache/appdata then it wouldn't have gotten to your /mnt/disk... yet.

 

 

Link to comment
2 minutes ago, John_M said:

But rm doesn't delete directories (unless the recursive -r option is included). So all rm /* does is delete all the files in your file system's root directory. You should be able to recover by simply rebooting.

And there aren't actually any files at /  it is all folders. So unless the recursive option was used I don't see how it could have done anything at all.

Link to comment

Probably should've been more precise in my original posting.  Unfortunately I did do "rm /* -rf" to recursively destroy everything on my server.  It was the 2 second delay that I realized from the slew of responses that I had completely fubar'ed.

 

All of my data in /mnt is still there as it only just started to nibble away through the /mnt/user/appdata files and folders.  But I'm assuming my /flash is toast as I'm not able to see any of the contents of the folder by navigating to it through the samba share.

 

I was just hoping that maybe I could run some kind of terminal command to export out a config file before crossing my fingers, praying to whatever god and hoping that it came back up. :(

Link to comment
25 minutes ago, mike_j_jensen said:

I was just hoping that maybe I could run some kind of terminal command to export out a config file before crossing my fingers, praying to whatever god and hoping that it came back up.

I think some of the config must be in the OS folders somewhere so it doesn't have to constantly read them from the flash, but I don't know the details. Maybe they wouldn't have survived anyway.

 

Maybe your old backup has enough in it to be useful. If you take the config folder from that backup, edit disk.cfg to set startarray to no, then you should be able to boot with it and check your disk assignments before starting.

1 hour ago, trurl said:

You must be absolutely sure you don't assign a data disk to the parity slot or it will be overwritten.

Then see what else is already there working as expected.

 

 

Link to comment

So I finally shutdown the machine and attempted to run some software recovery on the flash drive to see if I could restore it back to normal.  Unfortunately just about everything other than the contents of the config folder came back. :(

 

I looked through my old backup, and unfortunately it's super old.  I have since added more disks and went to dual parity.

2x8tb for parity

7x5tb for data

1x512gb ssd for cache

 

I've been reading through some other forums and tickets and it looks like I can simply install unRAID onto a new flash drive and boot it up.  And as long as I don't assign any of the data disks to parity, I should be able to assign all the data disks and then I'm assuming I can recreate the shares to gain access to the data?

 

And thanks again for all the assistance on this!  Definitely learning a hard lesson on this one!

Link to comment
5 hours ago, mike_j_jensen said:

I've been reading through some other forums and tickets and it looks like I can simply install unRAID onto a new flash drive and boot it up.  And as long as I don't assign any of the data disks to parity, I should be able to assign all the data disks and then I'm assuming I can recreate the shares to gain access to the data?

Correct.

 

Your shares will already exist since the user shares are just the top folders on cache and array. So if the data is there then the shares will be there. But since you don't have their settings any more, they will all have default settings.

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.