Jump to content

Well, I accidentally deleted everything... do I have any hope?


Recommended Posts

I am an idiot.

 

I've just been getting started with unraid over the past month or so. Got my server, loaded all my mess of drives I had been using, got plugins, dockers, moved emby over to it, etc.   Everything was going pretty great.  

 

At one point when i setup krusader I had a weird mapping and created a folder homebase in /mnt inadvertently.  It was empty, no big deal.  But every few days Fix Common Problems would yell at me about it that is was an invalid directory.  So i finally got around to trying to delete it, but i couldn't. Krusader wouldn't let me, due to permissions i am assuming, didn't get an errors, it just wouldn't do it.   

 

Then i did some googling and saw how you could do it via console (which i have zero experience with), but it was dangerous and to be careful.  Well yah, I am an idiot. 

 

I navigated to mnt and tried to delete the folder /mnt/homebase using rm rf.  and it hung for a sec and then looks like it deleted everything.   So I'm guessing the syntax I used was not right. 

 

 I stopped array but all my drives are empty... including the parity.   none of my dockers are there, plugins tab isn't even loading.

 

Is there any possible way to recover here, or am i totally fucked?  Even if its a long process, I am up for anything, please help.

 

Oh and fix common problems is still complaining about the folder, so i guess that is still working.   🤬

Link to comment

If you used

rm -rf /mnt/homebase

Then only that folder would be gone.  You probably did something like rm -rf /mnt  But it wouldn't hurt to post your diagnostics.

 

At this point, you best recovery option is to pull the drives, attach them to a Windows box and try out UFS Explorer to recover the data.  (It has a free option that let's you see what to recover, but the full version runs something like $80

  • Like 1
Link to comment

I would 100% pay that and more to recover it without question.  Attached are the diagnostics.

 

Can you see in the logs what command i used?  There were 2 invalid folders home and homebase.  I actually was deleting home.  So I'm almost positive i did rm -rf /mnt/home.  I just assume that wasn't the correct command.   That almost makes me hopeful if that was the correct one?

homebase-diagnostics-20210408-1821.zip

Link to comment
13 minutes ago, Geremye said:

right... so UFS is my only play then?

seems so

 

14 minutes ago, Geremye said:

in the logs is there anyway to see the command I used to see exactly what I did wrong?

I don't think those are logged.

 

When you started the array here you still had docker.img

Apr  8 16:07:06 Homebase emhttpd: Starting services...
Apr  8 16:07:25 Homebase kernel: md: import_slot: 29 replaced
Apr  8 16:08:01 Homebase emhttpd: shcmd (10240): /usr/local/sbin/mount_image '/mnt/user/system/docker/docker.img' /var/lib/docker 20
Apr  8 16:08:02 Homebase kernel: BTRFS info (device loop2): using free space tree
Apr  8 16:08:02 Homebase kernel: BTRFS info (device loop2): has skinny extents
Apr  8 16:08:02 Homebase root: Resize '/var/lib/docker' of 'max'
Apr  8 16:08:02 Homebase emhttpd: shcmd (10242): /etc/rc.d/rc.docker start
Apr  8 16:08:02 Homebase root: starting dockerd ...

 

But when you started the array here docker.img had to be recreated

Apr  8 17:24:09 Homebase emhttpd: Starting services...
Apr  8 17:25:57 Homebase emhttpd: shcmd (10665): /usr/local/sbin/mount_image '/mnt/user/system/docker/docker.img' /var/lib/docker 20
Apr  8 17:25:57 Homebase root: Creating new image file: /mnt/user/system/docker/docker.img size: 20G
Apr  8 17:25:57 Homebase root: btrfs-progs v5.10 
Apr  8 17:25:57 Homebase root: See http://btrfs.wiki.kernel.org for more information.
Apr  8 17:25:57 Homebase root: 
Apr  8 17:25:57 Homebase root: Label:              (null)
Apr  8 17:25:57 Homebase root: UUID:               c57f5a34-f816-4d3e-9e1f-bf23d710ecc2
Apr  8 17:25:57 Homebase root: Node size:          16384
Apr  8 17:25:57 Homebase root: Sector size:        4096
Apr  8 17:25:57 Homebase root: Filesystem size:    20.00GiB
Apr  8 17:25:57 Homebase root: Block group profiles:
Apr  8 17:25:57 Homebase root:   Data:             single            8.00MiB
Apr  8 17:25:57 Homebase root:   Metadata:         DUP             256.00MiB
Apr  8 17:25:57 Homebase root:   System:           DUP               8.00MiB
Apr  8 17:25:57 Homebase root: SSD detected:       no
Apr  8 17:25:57 Homebase root: Incompat features:  extref, skinny-metadata
Apr  8 17:25:57 Homebase root: Runtime features:   
Apr  8 17:25:57 Homebase root: Checksum:           crc32c
Apr  8 17:25:57 Homebase root: Number of devices:  1
Apr  8 17:25:57 Homebase root: Devices:
Apr  8 17:25:57 Homebase root:    ID        SIZE  PATH
Apr  8 17:25:57 Homebase root:     1    20.00GiB  /mnt/cache/system/docker/docker.img
Apr  8 17:25:57 Homebase root: 
Apr  8 17:25:57 Homebase kernel: BTRFS: device fsid c57f5a34-f816-4d3e-9e1f-bf23d710ecc2 devid 1 transid 5 /dev/loop2 scanned by udevd (29994)
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): enabling free space tree
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): using free space tree
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): has skinny extents
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): flagging fs with big metadata feature
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): enabling ssd optimizations
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): creating free space tree
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): setting compat-ro feature flag for FREE_SPACE_TREE (0x1)
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): setting compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)
Apr  8 17:25:57 Homebase kernel: BTRFS info (device loop2): checking UUID tree
Apr  8 17:25:57 Homebase emhttpd: shcmd (10667): /etc/rc.d/rc.docker start

so that sort of tells us when it happened.

 

Nothing at all in syslog between these 2 lines.

Apr  8 16:46:22 Homebase kernel: docker0: port 2(veth89eb402) entered forwarding state
Apr  8 17:00:16 Homebase crond[2068]: exit status 1 from user root /usr/local/sbin/mover &> /dev/null

Probably that is where you were doing the damage since all the other syslog before and after is pretty routine start/stop stuff.

 

My guess is

20 hours ago, Squid said:

You probably did something like rm -rf /mnt

 

  • Like 1
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.

×
×
  • Create New...