public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: "S." <sb56637@gmail.com>, Qu Wenruo <wqu@suse.com>,
	"linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: Upgraded from Buster to Bullseye, unmountable Btrfs filesystem
Date: Fri, 12 Nov 2021 08:06:15 +0800	[thread overview]
Message-ID: <873ea73d-c3ab-9471-de22-5555980ce1ee@gmx.com> (raw)
In-Reply-To: <fdcac254-e169-7aba-7a12-c828aaab3231@gmail.com>



On 2021/11/11 21:55, S. wrote:
> On 11/11/21 02:11, Qu Wenruo wrote:
>
>>> root@OpenMediaVault:~# dd if=/dev/sda3 of=/tmp/mirror1 bs=1 count=16k
>>> skip=149487616
>>> 16384+0 records in
>>> 16384+0 records out
>>> 16384 bytes (16 kB, 16 KiB) copied, 0.305711 s, 53.6 kB/s
>>
>> My bad, this copy should be from /dev/sdb2, not /dev/sda3.
>>
>> No wonder both copy doesn't match.
>
> Hi, I really appreciate your help to fix this. I am attaching the new
> `mirror1` image, generated like this:
>
> ------------------------
> root@OpenMediaVault:~# dd if=/dev/sdb2 of=/tmp/mirror1 bs=1 count=16k

You missed the "skip=" parameter.

> 16384+0 records in
> 16384+0 records out
> 16384 bytes (16 kB, 16 KiB) copied, 0.274943 s, 59.6 kB/s
> root@OpenMediaVault:~# rsync -avh /tmp/mirror1
> sully@192.168.1.14:/home/sully/Desktop/
> Password:
> sending incremental file list
> mirror1
>
> sent 16.49K bytes  received 35 bytes  3.67K bytes/sec
> total size is 16.38K  speedup is 0.99
> ------------------------
>
>
>> # dd if=mirror2 of=/dev/sdb2 bs=1 count=16k skip=149487616
>> # dd if=mirror2 of=/dev/sda3 bs=1 count=16k skip=170459136

All my bad.

The correct command line should be:

# dd if=mirror2 of=/dev/sdb2 bs=1 count=16k seek=149487616
# dd if=mirror2 of=/dev/sda3 bs=1 count=16k seek=170459136

Thankfully, even with the wrong command, btrfs has enough space reserved
at its beginning, so your fs is still untouched and very safe.

Thanks,
Qu
>
> After writing out your fixed `mirror2` image with the above commands I
> get these dmesg errors when attempting to mount it:
>
> -------------------------
> [   28.859193] BTRFS info (device sda3): flagging fs with big metadata
> feature
> [   28.866209] BTRFS info (device sda3): disk space caching is enabled
> [   28.872507] BTRFS info (device sda3): has skinny extents
> [   29.053000] BTRFS critical (device sda3): corrupt leaf: root=9
> block=170459136 slot=0, invalid key objectid, have 1101835439474057344
> expect to be aligned to 4096
> [   29.067527] BTRFS error (device sda3): block=170459136 read time tree
> block corruption detected
> [   29.120141] BTRFS critical (device sda3): corrupt leaf: root=9
> block=170459136 slot=0, invalid key objectid, have 1101835439474057344
> expect to be aligned to 4096
> [   29.134781] BTRFS error (device sda3): block=170459136 read time tree
> block corruption detected
> [   29.143568] BTRFS warning (device sda3): failed to read root
> (objectid=9): -5
> [   29.239873] BTRFS error (device sda3): open_ctree failed
> -------------------------
>
> Please let me know if you need anything else. Thanks a lot!

  parent reply	other threads:[~2021-11-12  0:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10  2:17 Upgraded from Buster to Bullseye, unmountable Btrfs filesystem S.
2021-11-10  2:33 ` Qu Wenruo
2021-11-10  2:55 ` S.
2021-11-10  3:34   ` Qu Wenruo
2021-11-10  4:30   ` S.
2021-11-10  7:01     ` Qu Wenruo
2021-11-10 14:01       ` S.
2021-11-10 23:46         ` Qu Wenruo
2021-11-11  0:18           ` S.
2021-11-11  0:58             ` Qu Wenruo
2021-11-11  2:29               ` S.
     [not found]               ` <e19518ec-a885-4a1d-1dda-a5be645a1d73@gmail.com>
     [not found]                 ` <73fb26b3-932c-9592-bced-6a3fda3456f0@gmx.com>
     [not found]                   ` <fdcac254-e169-7aba-7a12-c828aaab3231@gmail.com>
2021-11-12  0:06                     ` Qu Wenruo [this message]
2021-11-11  5:22         ` S.
2021-11-11  6:20           ` Rosen Penev
2021-11-11 14:26             ` S.
2021-11-12 15:18     ` S.

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=873ea73d-c3ab-9471-de22-5555980ce1ee@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sb56637@gmail.com \
    --cc=wqu@suse.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