From: Chris Murphy <lists@colorremedies.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: confusing behavior when supers mismatch
Date: Sun, 10 Mar 2019 23:19:19 -0600 [thread overview]
Message-ID: <CAJCQCtQC0piAP7BLHHwm2kgAn7Rpu=-tqFn-vi7jECS3X-8J1w@mail.gmail.com> (raw)
In-Reply-To: <2621cc31-0d74-f514-fae4-fea35e34fae3@gmx.com>
On Sun, Mar 10, 2019 at 10:58 PM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
>
> Normally 'btrfs rescue super' should be enough for accidentally wiped btrfs.
>
> If not, then we should fix it of course.
Looks like a bug then.
$ sudo mkfs.btrfs /dev/mapper/vg-f30test
btrfs-progs v4.20.2
See http://btrfs.wiki.kernel.org for more information.
Label: (null)
UUID: e819e675-a697-45f8-8351-d109d5b95514
Node size: 16384
Sector size: 4096
Filesystem size: 100.00GiB
Block group profiles:
Data: single 8.00MiB
Metadata: DUP 1.00GiB
System: DUP 8.00MiB
SSD detected: no
Incompat features: extref, skinny-metadata
Number of devices: 1
Devices:
ID SIZE PATH
1 100.00GiB /dev/mapper/vg-f30test
$ sudo mount /dev/mapper/vg-f30test /mnt/test
$ sudo umount /mnt/test
$ sudo wipefs -a /dev/mapper/vg-f30test
/dev/mapper/vg-f30test: 8 bytes were erased at offset 0x00010040
(btrfs): 5f 42 48 52 66 53 5f 4d
$ sudo btrfs rescue super -v /dev/mapper/vg-f30test
No valid Btrfs found on /dev/mapper/vg-f30test
Usage or syntax errors
$ echo "_BHRfS_M" | sudo dd bs=1 count=8 of=/dev/mapper/vg-f30test
seek=$((64*1024+64))
8+0 records in
8+0 records out
8 bytes copied, 0.00523996 s, 1.5 kB/s
$ sudo btrfs rescue super -v /dev/mapper/vg-f30test
All Devices:
Device: id = 1, name = /dev/mapper/vg-f30test
Before Recovering:
[All good supers]:
device name = /dev/mapper/vg-f30test
superblock bytenr = 65536
device name = /dev/mapper/vg-f30test
superblock bytenr = 67108864
[All bad supers]:
All supers are valid, no need to recover
$
--
Chris Murphy
next prev parent reply other threads:[~2019-03-11 5:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-10 23:09 confusing behavior when supers mismatch Chris Murphy
2019-03-10 23:18 ` Chris Murphy
2019-03-11 1:17 ` Qu Wenruo
2019-03-11 3:20 ` Chris Murphy
2019-03-11 4:58 ` Qu Wenruo
2019-03-11 5:19 ` Chris Murphy [this message]
2019-03-11 12:26 ` Nikolay Borisov
2019-03-11 12:35 ` Qu Wenruo
2019-03-11 12:37 ` Nikolay Borisov
2019-03-11 13:27 ` Qu Wenruo
2019-03-11 14:38 ` Anand Jain
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='CAJCQCtQC0piAP7BLHHwm2kgAn7Rpu=-tqFn-vi7jECS3X-8J1w@mail.gmail.com' \
--to=lists@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
/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;
as well as URLs for NNTP newsgroup(s).