[SOLVED] URGENT HELP Please: Deleted files from the flash by mistake, how do I restore it?


abhi.ko

Recommended Posts

So I did execute

rm -rf \*

on accident and then stopped it pretty quickly (<2s), and the command generated a bunch of cannot remove messages,

cli window.jpg

 

now the Web UI doesn't work, but the shares, docker containers all seem to be live and working.

236161360_Screenshot2020-09-22181617.thumb.jpg.507d4ffdff812b930f747d86b2e2400a.jpg

 

I do have my appdata and USB backup folder but the USB Backup permissions doesn't seem to be correct and I can't run chmod or almost any command from the terminal - it says command not found.  

 

How do I fix this without having to reconfigure everything again?

 

Edited by abhi.ko
Link to comment

What you need to do is this (assuming the USB backup is on the array)

 

  • Set up a new flash drive as a trial
  • Assign ALL drives as DATA drives.
  • Start the array.  One or more will come up as unmountable.  Do NOT format them.

You should now have access to the Flash Backup share.  Copy it to your old flash drive.

 

Reboot with the old flash drive.  Everything *should* be good.

Link to comment
3 minutes ago, Squid said:

What you need to do is this (assuming the USB backup is on the array)

 

  • Set up a new flash drive as a trial
  • Assign ALL drives as DATA drives.
  • Start the array.  One or more will come up as unmountable.  Do NOT format them.

You should now have access to the Flash Backup share.  Copy it to your old flash drive.

 

Reboot with the old flash drive.  Everything *should* be good.

Yes the USB backup is on the array, under a share.

 

So please bear with me:

What do you mean by - Assign ALL drives as DATA drives.

I have never checked the USB Backup location before this, just trusted the Appdata Backup plugin to do its work, is there any way to check the contents in that drive, ls command doesn't work. Just wondering if the backup is not there, then what?

1073299282_Screenshot2020-09-22190558.jpg.3d8cea485c9cc11658d4b32dbde21711.jpg

I haven't yet powered the system down, because I am afraid I will loose access to shares and dockers and their configs, db's. So anything I need to do before shutting the system down. Download or move stuff? 

 

Link to comment

Yeah, you've trashed the in RAM OS, along with the boot flash drive.  In order to gain access to the shares and your flash backup, you need to set up another flash drive as a trial.

 

Since (presumably) you don't know what drives are what, you assign them all as data drives.  It's harmless so long as you don't click "Format".  Then you've got access to the shares and can restore your backup of the flash.

3 minutes ago, abhi.ko said:

So anything I need to do before shutting the system down.

Nope.  Any damage done is damage done at this point.  Assuming you stopped the command before it hit /mnt, then all of your data is safe

Link to comment
9 hours ago, abhi.ko said:

disk assignments should be pretty accurate

Pretty accurate and is accurate are two different things.  If there's any doubt if you moved the parity drive to be a data drive since June, then delete super.dat and reassign the disks manually.

 

Other than that, everything in /config you want.

Link to comment
21 minutes ago, abhi.ko said:

Not sure why parity had to be rebuilt though?

Did you start from New Config and reassign your disks? If so, parity is rebuilt by default from New Config unless you check the box saying parity is valid.

 

OR

 

Is it actually rebuilding parity, or just checking parity? Parity check from unclean shutdown is expected when you restore a backup super.dat (disk assignments) unless the backup was taken with the array stopped.

 

In addition to disk assignments, super.dat records the array stopped / started status. If super.dat doesn't say the array was stopped when you boot, it assumes an unclean shutdown.

Link to comment
23 minutes ago, trurl said:

Did you start from New Config and reassign your disks? If so, parity is rebuilt by default from New Config 

Yes, all the disk assignments came up empty after boot and I had to reassign the disks manually, the Disk Assignments.txt in the config directory that was saved a day earlier is what I used for reassigning and they are right.

 

Not sure why they had to be manually reassigned, after I copied over the contents of the flash from the 9/21 back up and made the disk bootable, I thought it would retain the disk assignments.

Quote

unless you check the box saying parity is valid.

I did not check that box, I should have, the parity was valid.  I remember seeing that box and thinking, if I don't check it, it will just do a parity check. Did not realize that it will trigger a rebuild.  It is definitely rebuilding parity, but all the shares, dockers, plugins, and data seems to be fine.

 

Is there a negative, if the parity is rebuilt? Other than the array being unprotected for the rebuild duration.

 

Edited by abhi.ko
Link to comment
9 minutes ago, abhi.ko said:

Is there a negative, if the parity is rebuilt? Other than the array being unprotected for the rebuild duration.

No. Parity rebuild could be faster than parity check since it doesn't bother to check.

 

And, if the parity is valid, it is just overwriting with the same parity data. You could recover another disk if necessary with another New Config and the invalidslot command.

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.