All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: evan d <forumscollective@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Two partitionless BTRFS drives no longer seen as containing BTRFS filesystem
Date: Sun, 7 Oct 2018 15:39:21 +0800	[thread overview]
Message-ID: <2122b08c-0fa9-b774-cbad-67b71f5084d4@gmx.com> (raw)
In-Reply-To: <CAG__1a7Yc4eZ=YHsr8mZFCyu2ceW3CJDhgK0XDQK=wipVtQUxw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2533 bytes --]



On 2018/10/7 下午2:47, evan d wrote:
>> None of your super blocks has correct magic.
> 
> 
> I take it this applies to both drives?

Yes, both drivers have something wrong.

> 
> 
> 
>> This means either your whole disk get corrupted, or something introduced
>> some offset.
>>
>> Please try the following commands to dump more data around super blocks,
>> so we could be able to find the possible offset:
>>
>> # dd if=/dev/sdb of=possible_sb_range.raw bs=1M count=128
>> # grep -obUaP "\x5F\x42\x48\x52\x66\x53\x5F\x4D" possible_sb_range.
>>
>> For a valid btrfs without any offset, the result should look like:
>> 65600:_BHRfS_M
>> 67108928:_BHRfS_M
> 
> # dd if=/dev/sdc of=possible_sb_range.sdc.raw bs=1M count=128
> 128+0 records in
> 128+0 records out
> 134217728 bytes (134 MB, 128 MiB) copied, 0.737479 s, 182 MB/s
> 
> # dd if=/dev/sdb of=possible_sb_range.sdb.raw bs=1M count=128
> 128+0 records in
> 128+0 records out
> 134217728 bytes (134 MB, 128 MiB) copied, 0.726327 s, 185 MB/s
> 
> # grep -obUaP "\x5F\x42\x48\x52\x66\x53\x5F\x4D" possible_sb_range.sdb.raw
> # grep -obUaP "\x5F\x42\x48\x52\x66\x53\x5F\x4D" possible_sb_range.sdc.raw
> 
> Both return nothing.

Then this is not good at all.

The super blocks should be at 64K and 64M.
If first 128M doesn't hit, I highly doubt something more strange happened.

> 
> Both drives pass S.M.A.R.T. testing so I'd have to think the
> corruption stems from some kind of offset rather than random
> corruption.

Corruption shouldn't happen like this.

And offset shouldn't be so large to offset the whole 128M range.

I'm considering something like encryption.
Maybe the disk is already encrypted by hardware?

>  They may have accidentally been inserted into a Windows
> machine (but not partitioned or formatted).  Could this be a likely
> cause?

Windows is just a black box, I have no idea what a Windows could do to a
disk.

But it doesn't explain why the 2nd super block can't be located, unless
Windows is wipe more data than the first 128M.

If the disk is larger than 256G, would you please try to locate the last
possible super at 256G?

# dd if=/dev/sdb bs=1M of=last_chance.raw count=128 skip=256M
# grep -obUaP "\x5F\x42\x48\x52\x66\x53\x5F\x4D" last_chance.raw

If still no hit, you could try just run the grep command on the disk.
It would take a long long time reading all data from the disk.

If still no hit, it means definitely not some easy offset.

Thanks,
Qu
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-10-07  7:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-06 23:23 Two partitionless BTRFS drives no longer seen as containing BTRFS filesystem evan d
2018-10-07  0:32 ` Remi Gauvin
2018-10-07  6:08   ` evan d
2018-10-07  0:41 ` Qu Wenruo
2018-10-07  6:10   ` evan d
2018-10-07  6:26     ` Qu Wenruo
2018-10-07  6:47       ` evan d
2018-10-07  7:39         ` Qu Wenruo [this message]
2018-10-07  8:09           ` evan d
2018-10-07  8:19             ` Qu Wenruo
2018-10-07  8:28               ` evan d
2018-10-07  9:47                 ` Qu Wenruo
2018-10-07 10:39                   ` evan d
2018-10-07 10:51                     ` Qu Wenruo
2018-10-07 12:25                       ` evan d
2018-10-07 12:26                         ` evan d

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=2122b08c-0fa9-b774-cbad-67b71f5084d4@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=forumscollective@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.