linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: "Jakob Schöttl" <jschoett@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Only one subvolume can be mounted after replace/balance
Date: Mon, 25 Jan 2021 15:47:17 -0700	[thread overview]
Message-ID: <CAJCQCtSwC--k1agUzBcGgdCZZu426fVoUw-V3m8C4XjeN7yQaA@mail.gmail.com> (raw)
In-Reply-To: <b693c33d-ed2e-3749-a8ac-b162e9523abb@gmail.com>

On Sat, Jan 23, 2021 at 7:50 AM Jakob Schöttl <jschoett@gmail.com> wrote:
>
> Hi,
>
> In short:
> When mounting a second subvolume from a pool, I get this error:
> "mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda,
> missing code page or helper program, or other."
> dmesg | grep BTRFS only shows this error:
> info (device sda): disk space caching is enabled
> error (device sda): Remounting read-write after error is not allowed

It went read-only before this because it's confused. You need to
unmount it before it can be mounted rw. In some cases a reboot is
needed.

>
> What happened:
>
> In my RAID1 pool with two disk, I successfully replaced one disk with
>
> btrfs replace start 2 /dev/sdx
>
> After that, I mounted the pool and did

I don't understand this sequence. In order to do a replace, the file
system is already mounted.

>
> btrfs fi show /mnt
>
> which showed WARNINGs about
> "filesystems with multiple block group profiles detected"
> (don't remember exactly)
>
> I thought it is a good idea to do
>
> btrfs balance start /mnt
>
> which finished without errors.

Balance alone does not convert block groups to a new profile. You have
to explicitly select a conversion filter, e.g.

btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /mnt

> Now, I can only mount one (sub)volume of the pool at a time. Others can
> only be mounted read-only. See error messages at top of this mail.
>
> Do you have any idea what happened or how to fix it?
>
> I already tried rescue zero-log and super-recovery which was successful
> but didn't help.

I advise anticipating the confusion will get worse, and take the
opportunity to refresh the backups. That's the top priority, not
fixing the file system.

Next let us know the following:

kernel version
btrfs-progs version
Output from commands:
btrfs fi us /mnt
btrfs check --readonly


-- 
Chris Murphy

  reply	other threads:[~2021-01-25 22:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 14:48 Only one subvolume can be mounted after replace/balance Jakob Schöttl
2021-01-25 22:47 ` Chris Murphy [this message]
2021-01-27 13:10   ` Jakob Schöttl
2021-01-27 20:56     ` Chris Murphy

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=CAJCQCtSwC--k1agUzBcGgdCZZu426fVoUw-V3m8C4XjeN7yQaA@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=jschoett@gmail.com \
    --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).