1

Around 1.5 hours ago I deleted a very important directory on my openVZ vps.

I have tried

root@server:/home extundelete /dev/simfs --restore-directory ./ --output-dir /home/restore/
extundelete: failed to read-only open device "/dev/simfs": Error code 1

How can I solve this issue?

EightBitTony
  • 20,963
  • 4
  • 61
  • 62
Naxid
  • 11
  • 1

1 Answers1

1

You can't recovery or check a filesystem mounted with read - write privileges.

You will need IMM or physical access to the machine and restart the machine in a maintenance mode or try chaning runlevel to 1, and then run the command umount /.

Another way is to using a live cd to mount and mount read only the partition to recovery your data.

Obviously you will need another place like a pendrive or something to save the files, beucase the main partition will remain read-only until you recovered all files, and remounted it.

If you really cant stop the server you can try to create a image file from the disk (but you will need another disk bigger to save it...)

dd if=/dev/mygreatdevice of=/mnt/myotherdisk/mygreatimage.img 

and run the ext4 data recovery on the mygreatimage.img

This can works but the files recovered can be more corrupted than the normal corruption of normally data recovery.

Luciano Andress Martini
  • 6,490
  • 4
  • 26
  • 56