- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Recover files on RAID5 with Extundelete?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Recover files on RAID5 with Extundelete?
So I've done a lot of reading and know this is my fault! However I still think there is a chance I can recover some files, so just wanted to ask here as a last resort.
I have a 4 disk (4TB x 4) setup in RAID 5.
I'm just trying to understand how this is seen as a raw device, it looks like the partition/device that contains the shares is /dev/md127 ?
cat /proc/mdstat Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] md127 : active raid5 sdb3[0] sdc3[3] sdd3[2] sda3[1] 11706506496 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/4] [UUUU] md1 : active raid6 sda2[0] sdd2[3] sdc2[2] sdb2[1] 1047424 blocks super 1.2 level 6, 64k chunk, algorithm 2 [4/4] [UUUU] md0 : active raid1 sda1[0] sdd1[3] sdc1[2] sdb1[1] 4190208 blocks super 1.2 [4/4] [UUUU]
The only option is to run extundelete on the NAS itself because I don't have a drive large enough to clone this array. What device should I be trying to run this on, and is it possible to unmount a share temporarily, maybe that will help?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@sg86 wrote:
The only option is to run extundelete on the NAS itself because I don't have a drive large enough to clone this array.
extundelete won't work because the NAS uses btrfs for the data volume (not ext).
The RAID array for the data volume is /dev/md127
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
Ok thanks for this, are there any other options? I am currently looking at running photorec directly on that /dev/md127 device, but no option to look at a specific folder so its going to take some time!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@sg86 wrote:
Also @StephenB is it possible to safely unmount /dev/md127 so i can try and run btrfs on it?
Yes. One option is to reboot the NAS in tech support mode.
After that you log in with telnet, using root as the username and infr8ntdebug as the password.
After you are logged in, you'd enter
# rnutil chroot
which will both start RAID and chroot. But it will not mount the data volume.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
Is it possible to do this via SSH, as obviously I'll need SSH access to run the btrfs restore utility.
I found a port about creating a ~/.tech-support file and rebooting, is that going to acheive the same purpose?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@sg86 wrote:
Is it possible to do this via SSH, as obviously I'll need SSH access to run the btrfs restore utility.
What you need is access to the linux command line (CLI). It doesn't matter if you get that with SSH or telnet - it's the same CLI either way. The benefit of tech support mode is that it doesn't mount the data volume.
@sg86 wrote:
I found a post about creating a ~/.tech-support file and rebooting, is that going to acheive the same purpose?
I haven't seen that post - maybe you could post a link to it? It's conceivable, but uncertain. So I'd suggest that using the boot menu.
BTW - can you confirm your model? Your initial post says RN212 - which definitely is wrong, because that only has two bays. My advice assumes that you have an OS-6 NAS (running 6.x firmware). But that was based on your model number - so we should sort that out before you go further.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
It was this post, you replied in it: https://community.netgear.com/t5/ReadyNAS-Idea-Exchange/Reboot-into-tech-support-mode-from-GUI/idi-p...
My Model is RN2120v2, and yes OS 6
I looked in the GUI but it says "secure mode" in settings not tech support, so how do i get into tech support?
Also how feasbile is BTRFS restore actually finding a recently deleted file, maybe my understanding of this utility is wrong and this is all a waste of time! It was a large (many GB), encrypted file with GPG key.
Thanks,
Shaun
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@sg86 wrote:
I looked in the GUI but it says "secure mode" in settings not tech support, so how do i get into tech support?
It's not done with the GUI, you need to use the boot menu. See pages 17-18 here: http://www.downloads.netgear.com/files/GDC/RN2120/ReadyNAS_OS6_Rackmount_HWM_EN.pdf
@sg86 wrote:
Also how feasbile is BTRFS restore actually finding a recently deleted file, maybe my understanding of this utility is wrong and this is all a waste of time! It was a large (many GB), encrypted file with GPG key.
Honestly I don't know (it's not something I've needed to do). The GPG encryption won't matter to the NAS or the BTRFS file system.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@StephenB I've booted into tech support mode, but i cannot ping the IP of the NAS? it says:
telnet: Unable to connect to remote host: No route to host
ping -c 4 192.168.1.y
PING 192.168.1.y (192.168.1.y) 56(84) bytes of data.
From 192.168.1.x icmp_seq=1 Destination Host Unreachable
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
For some reason it doesn't use my stastic IP setup, i found the same mac address assigned to a DCHP lease.
So I will play here for a little while with the btrfs utility and see what i can do, how do I safely exit this mode? I'm more worried about the RAID startup command you gave, do i need to reverse this?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
@sg86 wrote:
For some reason it doesn't use my stastic IP setup, i found the same mac address assigned to a DCHP lease.
Tech support mode isn't applying the network settings configured for the normal boot.
FWIW, I suggest that you reserve the IP address in your router instead of assigning a static IP in the ReadyNAS.
@sg86 wrote:
I'm more worried about the RAID startup command you gave, do i need to reverse this?
No. Just shutdown down the NAS is enough.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Recover files on RAID5 with Extundelete?
Ok, for your information in case it's useful, this does work in recovering files
HOWEVER, I stupidly overwrote the same filename, and the tree doesn't seem to have any valid roots apart from the recent one. I had hoped to recover an older tree and therefore the older revision.
I'm using a script: https://gist.github.com/Changaco/45f8d171027ea2655d74
And it seems it only uses the recent tree.
This script you can specifc the root: https://github.com/danthem/undelete-btrfs but it doesn't seem to work, even without specifying it doesn't find anything. I think the regex generation is broken because I enter the path and it just says "Regex generated: '^/(|$' " wihch wouldn't be correct.