public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Daniel Jones <dj@iowni.com>
Cc: antlists <antlists@youngman.org.uk>, linux-raid@vger.kernel.org
Subject: Re: Requesting assistance recovering RAID-5 array
Date: Tue, 31 Mar 2020 08:00:42 -0400	[thread overview]
Message-ID: <e77280ef-a5ac-f2d8-332c-dec032ddc842@turmel.org> (raw)
In-Reply-To: <CAB00BMg50zcerSLHShSjoOcaJ0JQSi2aSqTFfU2eQQrT12-qEg@mail.gmail.com>

Good morning Daniel,

On 3/30/20 10:09 PM, Daniel Jones wrote:
> Hello Phil,
>> In particular, knowledge of the filesystem or nested structure (LVM?) present on the array will be needed to identify the real data offsets of the three mangled members.
> 
> I don't have the history of original creation, but I'm fairly certain
> it was something straightforward like:
> 
>    mdadm --create /dev/md0 {parameters}
>    sudo mkfs.ext4 /dev/md0
>    mount /dev/md0 /mnt/raid5
> 
> After the array was corrupted I needed to comment out the mount from
> my fstab, which was as follows (confirming ext4):
> 
>      /dev/md0                                      /mnt/raid5
>     ext4    defaults        0       0

Ok.  This should be relatively easy, if a bit time consuming.  Things we 
know:

1) array layout, and chunk size: 512k or 1024 sectors
2) Active device #1 offset 261124 sectors.
3) The array had bad block logging turned on.  We won't re-enable this 
mis-feature.  It is default, so you must turn it off in your --create.

Things we don't know:

1) Data offsets for other drives.  However, the one we know appears to 
be the typical you'd get from one reshape after a modern default 
creation (262144).  There are good odds that the others are at this 
offset, except the newest one that might be at 262144.  You'll have to 
test four combinations: all at 261124 plus one at a time at 262144.

2) Member order for the other drives.  Three drives taken three at a 
time is six combinations.

3) Identity of the first drive kicked out. (Or do we know?)  If not 
known, there's four more combinations: whether to leave out or one of 
three left out.

That yields either twenty-four or 96 different --create --assume-clean 
combinations to test to find the one that gives you the cleanest 
filesystem in a read-only fsck.  (Do NOT mount!  Even a read-only mount 
will write to the filesystem.  Only test with fsck -n.)

Start by creating partitions on all devices, preferably at 2048 sectors. 
  (Should be the default offered.)  Use data offsets 259076 and 260100 
instead of 261124 and 262144.

I recommend writing out all the combinations before you start and 
keeping the fsck -n output from each until you have the final version 
you want.

Yeah, I'd write a script to do it all for me, if your best guess 
combination doesn't yield a good filesystem.

> Cheers,
> DJ

Phil

  reply	other threads:[~2020-03-31 12:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31  0:04 Requesting assistance recovering RAID-5 array Daniel Jones
2020-03-31  0:24 ` antlists
2020-03-31  0:51   ` Daniel Jones
2020-03-31  1:27     ` crowston.name
2020-03-31  1:50       ` Phil Turmel
2020-03-31  1:48     ` Phil Turmel
2020-03-31  2:09       ` Daniel Jones
2020-03-31 12:00         ` Phil Turmel [this message]
2020-03-31 13:36           ` Daniel Jones
2020-04-01  3:39           ` Daniel Jones
2020-04-01  4:45             ` Phil Turmel
2020-04-01  6:03               ` Daniel Jones
2020-04-01 12:15                 ` Wols Lists
2020-04-01 12:55                   ` Phil Turmel
2020-04-01 15:21                     ` Daniel Jones
2020-04-01 15:38                       ` Phil Turmel
2020-04-01 15:39                         ` Phil Turmel
2020-04-01 18:07                           ` Daniel Jones
2020-04-01 18:32                             ` Phil Turmel
2020-04-03 18:29                               ` Daniel Jones
2020-04-03 18:34                                 ` Phil Turmel
2020-04-03 18:42                                   ` Daniel Jones
2020-04-03 18:43                                     ` Phil Turmel
2020-04-03 20:13                                       ` Adam Goryachev
2020-04-03 20:14                                         ` Phil Turmel

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=e77280ef-a5ac-f2d8-332c-dec032ddc842@turmel.org \
    --to=philip@turmel.org \
    --cc=antlists@youngman.org.uk \
    --cc=dj@iowni.com \
    --cc=linux-raid@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