All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Clemens Kiehas <clemens@kiehas.at>, linux-raid@vger.kernel.org
Subject: Re: Missing superblock on two disks in raid5
Date: Thu, 30 Sep 2021 19:11:36 +0100	[thread overview]
Message-ID: <1241748e-5cfb-474d-3da1-a9f28ed691f2@youngman.org.uk> (raw)
In-Reply-To: <a66ec5ed-eeba-6c86-24b7-b3fd061082b9@kiehas.at>

On 30/09/2021 18:21, Clemens Kiehas wrote:
> Hello,
> 
> until recently I was using Unraid with 8 disks in an XFS array.
> I installed Debian on a spare SSD on the same machine and started 
> migrating disk by disk from the Unraid array to a raid5 array using a 
> second server as temporay storage. So I switched between Debian and 
> Unraid a lot to copy data and remove/add drives from/to arrays.
> 
>  From the beginning I always had to assemble the array without /dev/sdd, 
> add it afterwards and let it rebuild - since the array was working fine 
> afterwards I didn't really think much of it.

Not wise - as you've found out it was trashing your redundancy ...

> Appearently Unraid always overwrote the superblock of that 1 (and later 
> 2) disks (/dev/sdc and /dev/sdd) when I switched between the two OSs and 
> now mdadm isn't recognizing those 2 disks and I can't assemble the array 
> obviously.
> At least that's what I think happened, since file tells me that the 
> first 32k bytes are XFS:
> # losetup -o 32768 -f /dev/sdd
> # file -s /dev/loop0
> /dev/loop0: SGI XFS filesystem data (blksz 4096, inosz 512, v2 dirs)

That feels good, but I'm not sure how to proceed from here.
> 
> Right now mdadm only assembles 5 (instead of 7) disks as spares into an 
> inactive array at boot:
> # cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] 
> [raid4] [raid10]
> md0 : inactive sde[6](S) sdf1[5](S) sdg[1](S) sdh[3](S) sdi[8](S)
>        21487980896 blocks super 1.2
> unused devices: <none>
> 
> My system:
> Linux titan 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 
> GNU/Linux
> mdadm - v4.1 - 2018-10-01
> 
> Maybe I could try to assemble it with assume-clean and read-only?
> I found some pages in the wiki but I'm not 100% sure that they will 
> solve my problem and I don't want to make things worse.
> https://raid.wiki.kernel.org/index.php/Recovering_a_damaged_RAID
> https://raid.wiki.kernel.org/index.php/RAID_Recovery
> 
The first page talks about overlays. THEY WILL PROTECT YOUR DATA.

Make sure every disk is overlayed, then try assembling the overlays with 
your assume-clean. You won't need read-only but do it if you like it 
then do.

If you can then mount and run a fsck or whatever it is over the file 
system and it says everything is clean, then you can redo it without the 
overlays and recover the array properly. If it's messed up, just tear 
down the overlays and you're back where you started.

If it doesn't work, come back and tell us what happened (if it does 
work, please let us know :-)

Cheers,
Wol

  reply	other threads:[~2021-09-30 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d0350f88-304f-040d-6901-76f72932bbbf@kiehas.at>
2021-09-30 17:21 ` Missing superblock on two disks in raid5 Clemens Kiehas
2021-09-30 18:11   ` Wols Lists [this message]
2021-09-30 20:53     ` Clemens Kiehas

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=1241748e-5cfb-474d-3da1-a9f28ed691f2@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=clemens@kiehas.at \
    --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 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.