0

I know that a similar question has already been asked. This morning I accidentally formatted the wrong volume, containing mostly video files (about 30GB each).

I am currently trying to restore the files with Photorec, however it does not seem to work very well - all restored files are corrupted.

The volume is a Cryptsetup Luks ext4 volume (however not reformatted with LuksFormat, just mkfs.ext4)

Is it somehow possible to recover the old superblocks/journals? (And if yes, would that actually help restoring the old filesystem?)

migrated from serverfault.com Apr 12 '14 at 5:20

This question came from our site for system and network administrators.

  • 3
    I'm sorry for your loss. I hope it's not permanent, but I fear it might well be. Once you get past this, think really hard about your backup strategy. – MadHatter Apr 11 '14 at 8:54
  • My main HDD failed and the partition I formatted was actually my backup. So yeah, fml. – Force Apr 11 '14 at 9:22
  • Whatever you do, don't do it to the volume itself. cat /dev/sd? >/saved/image.file. Now experiment with the image as you like. – mikeserv Apr 12 '14 at 9:26
1

My recommendation is UFS Explorer. If that fails, you'll need professional assistance.

Standard recovery rules apply... Don't write to the affected volume and try to recover to another device.

Also see: https://serverfault.com/questions/469460/how-to-recover-xfs-file-system-with-superblock-read-failed/469461#469461

  • Looks good - does UFS Explorer take a different approach to Testdisk? – Force Apr 11 '14 at 9:23
  • 2
    I got a response from the UFS Explorer support team regarding this issue: >"Unfortunately our software will not help you more in this case. The reason is ext4 on time of format destroys completely all inodes and even file system journal so volume only contains file data; usually it is fragmented. Ext4 uses special tree structure to store map of file fragments and this tree is stored in inodes that are wiped with zeros. It’s recommended to continue using PhotoRec and other similar free utilities in attempt to get some data back; no commercial software will help you more in this case." – Force Apr 11 '14 at 10:19
  • Well, now we know! Sorry :( – ewwhite Apr 11 '14 at 11:20
0

Apparently it is not possible to recover the old ext4 filesystem. I am currently recovering some files with Photorec, with mixed success.

A response from the developing of UFS Explorer is as follow:

The reason is ext4 on time of format destroys completely all inodes and even file system journal so volume only contains file data; usually it is fragmented. Ext4 uses special tree structure to store map of file fragments and this tree is stored in inodes that are wiped with zeros.

It’s recommended to continue using PhotoRec and other similar free utilities in attempt to get some data back; no commercial software will help you more in this case.

As they are experts on that field and their statement is backed up by Wikipedia, I would therefore answer the question myself with the conclusion that it is not possible to restore the whole filesystem.

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.