public inbox for linux-raid@vger.kernel.org
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Luigi Fabio <luigi.fabio@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: RAID5 failure and consequent ext4 problems
Date: Sat, 10 Sep 2022 11:18:53 -0400	[thread overview]
Message-ID: <593e868a-d0a4-3ad5-d983-e585607ec212@turmel.org> (raw)
In-Reply-To: <CAJJqR23vGGpL-QRGKi-ft6X4RWWF0SPWJEEa=TPuo1zRnHPS3A@mail.gmail.com>

Hi Luigi,

Mixed in responses (and trimmed):

On 9/9/22 18:50, Luigi Fabio wrote:
 > By different kernels, maybe - but the kernel has been the same for
 > quite a while (months).

Yes.  Same kernels are pretty repeatable for device order on bootup as 
long as all are present.  Anything missing will shift the letter 
assignments.

 > I did paste the whole of the command lines in the (very long) email,
 > as David mentions (thanks!) - the first ones, the mistaken ones, did
 > NOT have --assume-clean but they did have -o, so no parity activity
 > should have started according to the docs?

Okay, that should have saved you.  Except, I think it still writes all 
the meta-data.  With v1.2, that would sparsely trash up to 1/4 gig at 
tbe beginning of each device.

 > A new thought came to mind: one of the HBAs lost a channel, right?
 > What if on the subsequent reboot the devices that were on that channel
 > got 'rediscovered' and shunted to the end of the letter order? That
 > would, I believe, be ordinary operating procedure.

Well, yes.  But doesn't matter for assembly attempts, with always go by 
the meta-data.  Device order only ever matters for --create when recreating.

 > That would give us an almost-correct array, which would explain how
 > fsck can get ... some pieces.

If you consistently used -o or --assume-clean, then everything beyond 
~3G should be untouched, if you can get the order right.  Have fsck try 
backup superblocks way out.

 > Also, I am not quite brave enough (...) to use shortcuts when handling
 > mdadm commands.

That's good.  But curly braces are safe.

 > I am reconstructing the port order (scsi targets, if you prefer) from
 > the 20220904 boot log. I should at that point be able to have an exact
 > order of the drives.

Please use lsdrv to capture names versus serial numbers.  Re-run it 
before any --create operation to ensure the current names really do 
match the expected serial numbers.  Keep track of ordering information 
by serial number.  Note that lsdrv will reliably line up PHYs on SAS 
controllers, so that can be trusted, too.

 > Here it is:

[trim /]

 > We have a SCSI target -> raid disk number correspondence.
 > As of this boot, the letter -> scsi target correspondences match,
 > shifted by one because as discussed 7:0:0:0 is no longer there (the
 > old, 'faulty' sdc).

OK.

 > Thus, having univocally determined the prior scsi target -> raid
 > position we can transpose it to the present drive letters, which are
 > shifted by one.
 > Therefore, we can generate, rectius have generated, a --create with
 > the same software versions, the same settings and the same drive
 > order. Is there any reason why, minus the 1.2 metadata overwriting
 > which should have only affected 12 blocks, the fs should 'not' be as
 > before?
 > Genuine question, mind.

Superblocks other than 0.9x and 1.0 place a bad block log and a written 
block bitmap between the superblock and the data area.  I'm not sure if 
any of the remain space is wiped.  These would be written regardless of 
-o or --assume-clean.  Those flags "protect" the *data area* of the 
array, not the array's own metadata.

On 9/9/22 19:04, Luigi Fabio wrote:
 > A further question, in THIS boot's log I found:
 > [ 9874.709903] md/raid:md123: raid level 5 active with 12 out of 12
 > devices, algorithm 2
 > [ 9874.710249] md123: bitmap file is out of date (0 < 1) -- forcing
 > full recovery
 > [ 9874.714178] md123: bitmap file is out of date, doing full recovery
 > [ 9874.881106] md123: detected capacity change from 0 to 42945088192512
 > From, I think, the second --create of /dev/123, before I added the
 > bitmap=none. This should, however, not have written anything with -o
 > and --assume-clean, correct?

False assumption.  As described above.

On 9/9/22 21:29, Luigi Fabio wrote:
 > For completeness' sake, though it should not be relevant, here is the
 > error that caused the mishap:

[trim /]

Noted, and helpful for correlating device names to PHYs.

Okay.  To date, you've only done create with -o or --assume-clean?

If so, it is likely your 0.90 superblocks are still present at the ends 
of the disks.

You will need to zero the v1.2 superblocks that have been placed on your 
partitions.  Then attempt an --assemble and see if mdadm will deliver 
the same message as before, identifying all of the members, but refusing 
to proceed due to event counts.

If so, repeat with --force.

This procedure is safe to do without overlays, and will likely yield a 
running array.

Then you will have to fsck to fix up the borked beginning of your 
filesystem.

Phil


  reply	other threads:[~2022-09-10 15:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-08 14:51 RAID5 failure and consequent ext4 problems Luigi Fabio
2022-09-08 17:23 ` Phil Turmel
2022-09-09 20:32   ` Luigi Fabio
2022-09-09 21:01     ` Luigi Fabio
2022-09-09 21:48       ` Phil Turmel
2022-09-09 22:11         ` David T-G
2022-09-09 22:50         ` Luigi Fabio
2022-09-09 23:04           ` Luigi Fabio
2022-09-10  1:29             ` Luigi Fabio
2022-09-10 15:18               ` Phil Turmel [this message]
2022-09-10 19:30                 ` Luigi Fabio
2022-09-10 19:55                   ` Luigi Fabio
2022-09-10 20:12                     ` Luigi Fabio
2022-09-10 20:15                       ` Phil Turmel
2022-09-10 20:14                     ` Phil Turmel
2022-09-10 20:17                       ` Phil Turmel
2022-09-10 20:24                         ` Luigi Fabio
2022-09-10 20:54                           ` Luigi Fabio
2022-09-12 19:09                     ` Phillip Susi
2022-09-13  3:58                       ` Luigi Fabio
2022-09-13 12:47                         ` Phillip Susi
2022-09-12 19:06                 ` Phillip Susi
2022-09-13  4:02                   ` Luigi Fabio
2022-09-13 12:51                     ` Phillip Susi

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=593e868a-d0a4-3ad5-d983-e585607ec212@turmel.org \
    --to=philip@turmel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=luigi.fabio@gmail.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