linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "johnh1214@gmail.com" <johnh1214@gmail.com>
To: Jani Partanen <jiipee@sotapeli.fi>,
	DanglingPointer <danglingpointerexception@gmail.com>,
	linux-btrfs@vger.kernel.org
Subject: Re: BTRFS RAID 5 array ran out of space, switched to R/O mode with errors
Date: Tue, 12 Aug 2025 13:55:14 -0700	[thread overview]
Message-ID: <74890d9d-d4d7-43b3-befa-f2091244c1be@gmail.com> (raw)
In-Reply-To: <fa41cbe0-e419-4cc8-88b4-09a2b0a49ddc@sotapeli.fi>

Thanks for the suggestion. I started looking into overlayfs as an option.

One thought that came to mind, I wonder what would happen if I made a snapshot of the main subvolume for the entire array, and tried to repair it? I doubt that'll work, since the snapshot sits on top of the underlying RAID structure, which is where the corruption most likely resides.

Since I need a new NAS with more storage, it's not really a waste of money to purchase 5 identical 8TB HDD's, and make full copies before trying to repair, I can use all 10 of the HDD's in the new NAS. The main issue, is I need enough storage to contain the current semi-broken data store, which means having a 3rd backup system, that's the main issue I'm working on solving.

if I can calculate exactly how much storage space can be successfully read, then I'll know how much temporary back up space I will need to make a copy.

On 2025-08-12 04:19, Jani Partanen wrote:
>
> On 10/08/2025 23.16, johnh1214@gmail.com wrote:
>> The best advice so far, was to copy all the data as is before performing a recovery. After that, if you can duplicate each drive exactly, then you can attempt multiple recovery's, however the array is too big for that much effort, so I have only one shot at it. The idea is to try mounting in "recovery" mode, if it tries to auto repair, cancel it, then add extra temporary storage space, because it was low on data. A balance operation is needed to free up space, but that seems dangerous given there's corruption, however a scrub may fail if there's not enough space. The temp storage should be large enough, very reliable (eg not a plugged in USB), and should have two partitions for duplicating the metadata.
>
>
> Hey, with overlayfs you can have as many shots as you like in theory. In short with overlayfs you can "freeze" your drives and all changes is written to temp files so you can start over and over.
>
> But I am not sure if this can be done with btrfs multi volume. Normally you just give one device or UUID at mount time.. Maybe with device= mount option it is possible to force mount to use all overlay devices, not real devices. But someone who knows this better need to answer that or some test to be made with dummy drives.
>
> Anyway overlayfs is worth to check out. It helped me to make sure that my mdadm raid-5 was running fine when something happened half the drives had different metadata update timestamp so it was not possible to assembly array. With overlayfs I was able to verify that force assembly works and array was fine.
>
>
> https://archive.kernel.org/oldwiki/raid.wiki.kernel.org/index.php/Recovering_a_failed_software_RAID.html#Making_the_harddisks_read-only_using_an_overlay_file
>
>
> There is some usage example for mdadm.
>
> But like I said before I am not sure if this is possible with btrfs multi volume.
>


      reply	other threads:[~2025-08-12 20:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-12 22:02 BTRFS RAID 5 array ran out of space, switched to R/O mode with errors johnh1214
2025-08-10  8:10 ` DanglingPointer
2025-08-10 20:16   ` johnh1214
2025-08-11  2:02     ` DanglingPointer
2025-08-12 20:23       ` johnh1214
2025-08-12 23:28         ` DanglingPointer
2025-08-13  0:43           ` johnh1214
2025-08-13  7:29           ` Paul Jones
2025-08-12 11:19     ` Jani Partanen
2025-08-12 20:55       ` johnh1214 [this message]

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=74890d9d-d4d7-43b3-befa-f2091244c1be@gmail.com \
    --to=johnh1214@gmail.com \
    --cc=danglingpointerexception@gmail.com \
    --cc=jiipee@sotapeli.fi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).