Announcement

Collapse
No announcement yet.

btrfs: best way to recover after erasing the partitions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    btrfs: best way to recover after erasing the partitions

    Hi,

    Spoiler: a professional site rescued my hard drive which I formatted inadvertently, so this post is mainly to understand rather than to recover from panic...

    I formatted my hard drive by choosing the wrong device to initialize a USB card to create a boot device.

    My drive (1TB SSD Nvme) had many LVM partitions and one of them had several logical partitions mainly in btrfs, partitions have been enlarged several times.
    I was prepared to bad news but a professional site in Rome recovered already 1million files (at a *very* low price).
    They passed me a list of 11 million files that are recoverable.

    My first question is: once you find a BTRFS superblock I read you can mount it even without a partition just indicating the offset. Does that mean that btrfs keeps track of the position of each file independently from the partition boundary?
    Is it any necessary to have the original device or a copy made with 'cat /dev/sda' is as good as the original device?
    What is the best way to find all the superblock and their position?

    Thanks in advance
    Sandro

    #2
    Optional but highly recommended: make an image copy of the whole drive to a safe place. This is how you recover if something goes wrong with the next step.
    Last edited by newiron09; Nov 04, 2024, 04:16 AM.

    Comment


      #3
      I believe if you locate a btrfs superblock, you can re-create the btrfs file system by simply recreating it. However, the added complexity of LVM may make this impossible.

      https://www.reddit.com/r/btrfs/comme...tion_undelete/

      Please Read Me

      Comment

      Working...
      X