deleted files

Oxnas 810 based
Post Reply
Posts: 11
Joined: Wed Jan 26, 2011 10:18 pm

deleted files

Post by andyamos79 » Fri Aug 22, 2014 10:03 pm

Hi all
Just wondered if any of you can suggest a good way to recover some deleted files?

I mistakenly deleted some and have been trying despatately to recover them using Ubuntu mounting the drive as xfs and read only but for some reason cannot get the drive to play ball and worse still the software I am using (photorec) wont check just empty space so it's trying to recover ALL files. This wouldn't be so bad except I have close to 100000 photos and so finding the originally missing files may take a little while.

What I would like to do is mount the drive as read only in the NSA so it doesn't reduce my chances of recovering the files and copy them to another drive either over the network or to an external mounted usb / esata drive.

I haven't hacked the unit so it's still got stock firmware and not using the ffp usb trick yet but if that's what I need to do, of course I'll try it. The If anyone could point me in the right direction I (and the bride whose pictures I have deleted) would be most grateful.

Thanks in advance


Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: deleted files

Post by Mijzelf » Sat Aug 23, 2014 11:57 am

Unfortunately xfs doesn't have an undelete option, so low-level recovery, like you already tried with PhotoRec, seems the only option.

About read-only mounting of the disk in the NAS, that might be possible, but needs some scripting. Using ffp alone is not enough, as the disk is already mounted before ffp starts. The trick which can be used is that is called before the data partition is mounted, which gives the opportunity to exchange the mount function itself by a script, which parses the mount commands, and add a ro flag when the data partition is mounted.
However, I don't know what the firmware will do with a read-only data partition. It always tries to write some logfiles and stuff, which will fail, of course.

How many effort and money are you willing to invest? My approach would be to first make a low-level backup of the whole disk, and put the original in a safe (figuratively. that safe).
Then let a script run on that copy to fill all existing files with zero's, to get around the problem that PhotoRec in raw modus cannot ignore existing files. And finally let PhotoRec recover the files to a 3th disk.

Post Reply