3

I have a Synology NAS with a RAID 1 setup on which I recently accidentally deleted a shared folder with data I want back. I shut down the NAS and booted into a machine with an Ubuntu Live Cd and attached one of the NAS drives.

I made an image of the drive using DD and now have an oldhd.img file on an external drive.

I then moved to a new machine, booted up with the Live CD attached the external drive and changed to the external drive directory and ran this command

mount -r -o loop oldhd.img /mnt

Then I ran fdisk -l and saw the drive I need to be recovered was /dev/sdb

I changed dir to my computer's hard drive folder and ran:

extundelete /dev/sdb --restore-all

It returns :

extundelete - failed to read-only open device "/dev/sdb": Error code 2133571347

What am I doing wrong? And what should I do instead?

  • Ok so I created an image of the entire disk, not a copy of the file system. So in this case I read I must specify offset options for losetup? How to do this? – Gene Mills Nov 22 '14 at 13:10
0

When you use mount with the -r option, the filesystem is mounted read only. In order to do any writing to the disk you must not mount in read only.

So, the command should be

mount -o loop oldhd.img /mnt

Also, from a sourceforge forum post:

Error code 2133571347 is "EXT2_ET_BAD_MAGIC" This means there is no valid signature for the superblock.

Either:

  • The superblock is corrupt, in which case you can try to open the file system with help of the superblock copies. see options -b blocknumber and -B blocksize, or
  • You have made ​​a mistake during the creation of the file system image, or
  • You have created an image of the entire disk, not a copy of the file system, in which case you must specify offset options for losetup.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.