Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: linux-btrfs@vger.kernel.org, Qu Wenruo <quwenruo.btrfs@gmx.com>
Subject: Re: strangely uncorrectable errors with RAID-5
Date: Mon, 21 Oct 2024 14:55:46 +1100	[thread overview]
Message-ID: <8439012.T7Z3S40VBb@cupcakke> (raw)
In-Reply-To: <67b3649b-2372-4846-bb86-79fafec1bab0@gmx.com>

On Monday, 21 October 2024 08:01:52 AEDT Qu Wenruo wrote:
> The metadata is gone, and there is only one mirror for it.
> 
> What profile are you using for metadata?

# btrfs fi df /mnt
Data, RAID5: total=4.92GiB, used=1.21GiB
System, RAID5: total=48.00MiB, used=16.00KiB
Metadata, RAID5: total=864.00MiB, used=172.77MiB
GlobalReserve, single: total=6.95MiB, used=0.00B

It's all RAID5.  Why would it be all gone?  Also why can't it be recreated 
when diff doesn't report any file loss?  Can I convert a BTRFS filesystem from 
this state to an all good state?

As an aside I've had something quite similar happen on a production server 
running Ubuntu 20.04 and RAID-1 and now I'm just running it knowing that a 
scrub will give errors but that it apparently works.

> Just in case, RAID5 is not recommended for metadata due to the complex

From what I know it's still not recommended for anything though.  But 
definitely if I didn't want to have data loss and I wanted RAID-5 then I'd use 
RAID-1 for metadata.  But in this case I was more interested in seeing how it 
might break than in keeping the data intact.

> recovery combinations:
>  >> The power failure safety for metadata with RAID56 is not 100%.
> 
> I'm pretty sure if you're using RAID5 for metadata, that's exactly the
> case where corrupted metadata can not be properly fixed at a per-sector
> basis.
> 
> Thus it's recommended to go RAID1* for metadata if you want to use RAID5
> for data.

OK.  I'll run some new tests on RAID1 metadata and RAID5 data and see how that 
goes.

Is there any way of recovering the filesystem with those errors or is mkfs 
required?

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/




  reply	other threads:[~2024-10-21  3:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-20 10:09 strangely uncorrectable errors with RAID-5 Russell Coker
2024-10-20 21:01 ` Qu Wenruo
2024-10-21  3:55   ` Russell Coker [this message]
2024-10-21  4:26     ` Qu Wenruo
2025-03-14 12:27       ` Russell Coker
2025-03-14 16:54         ` Russell Coker
2025-03-14 19:32           ` Thiago Ramon
2025-03-15  2:51             ` Russell Coker
2025-03-15  5:19             ` Andrei Borzenkov

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=8439012.T7Z3S40VBb@cupcakke \
    --to=russell@coker.com.au \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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