From: Emil <broetchenrackete@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Recover btrfs partition after accidental reformat
Date: Mon, 7 Mar 2022 20:10:45 +0000 (UTC) [thread overview]
Message-ID: <1cb1e7d9-51d0-4c2e-8cd1-6b02d045bcad@gmail.com> (raw)
Hi,
I did a boo boo and reformatted my btrfs partition with NTFS (used the wrong /dev/sdX). It was a single drive with standard options (metadata dup, data single) and it was the only partition of the drive.
I have not written any data to the ntfs partition.
Is there any chance of data recovery? The only thing I found was a backup superblock:
[bluemond@BlueQ ~]$ sudo btrfs insp dump-su -s 2 /dev/sdh1
superblock: bytenr=274877906944, device=/dev/sdh1
---------------------------------------------------------
csum_type 0 (crc32c)
csum_size 4
csum 0x69883d2a [match]
bytenr 274877906944
flags 0x1
( WRITTEN )
magic _BHRfS_M [match]
fsid 6dc337f5-2146-4aa5-a9c1-8faf1e2994c5
metadata_uuid 6dc337f5-2146-4aa5-a9c1-8faf1e2994c5
label
generation 7004
root 436338688
sys_array_size 129
chunk_root_generation 7002
root_level 0
chunk_root 22020096
chunk_root_level 0
log_root 0
log_root_transid 0
log_root_level 0
total_bytes 2000397864960
bytes_used 125869297664
sectorsize 4096
nodesize 16384
leafsize (deprecated) 16384
stripesize 4096
root_dir 6
num_devices 1
compat_flags 0x0
compat_ro_flags 0x3
( FREE_SPACE_TREE |
FREE_SPACE_TREE_VALID )
incompat_flags 0x341
( MIXED_BACKREF |
EXTENDED_IREF |
SKINNY_METADATA |
NO_HOLES )
cache_generation 0
uuid_tree_generation 7004
dev_item.uuid 0c86cfd6-fc28-4f99-9b4a-6bd3546aa523
dev_item.fsid 6dc337f5-2146-4aa5-a9c1-8faf1e2994c5 [match]
dev_item.type 0
dev_item.total_bytes 2000397864960
dev_item.bytes_used 131021668352
dev_item.io_align 4096
dev_item.io_width 4096
dev_item.sector_size 4096
dev_item.devid 1
dev_item.dev_group 0
dev_item.seek_speed 0
dev_item.bandwidth 0
dev_item.generation 0
I tried using photorec, but the btrfs partition was pretty fresh and I had a ntfs partition with lots of data before that so it finds all kinds of data from the old ntfs partition.
next reply other threads:[~2022-03-07 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 20:10 Emil [this message]
2022-03-07 23:29 ` Recover btrfs partition after accidental reformat Chris Murphy
2022-03-08 22:20 ` Emil
2022-03-08 23:04 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1cb1e7d9-51d0-4c2e-8cd1-6b02d045bcad@gmail.com \
--to=broetchenrackete@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox