All of lore.kernel.org
 help / color / mirror / Atom feed
* Only one subvolume can be mounted after replace/balance
@ 2021-01-23 14:48 Jakob Schöttl
  2021-01-25 22:47 ` Chris Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: Jakob Schöttl @ 2021-01-23 14:48 UTC (permalink / raw)
  To: linux-btrfs

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

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

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.

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.

Regards, Jakob

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Only one subvolume can be mounted after replace/balance
  2021-01-23 14:48 Only one subvolume can be mounted after replace/balance Jakob Schöttl
@ 2021-01-25 22:47 ` Chris Murphy
  2021-01-27 13:10   ` Jakob Schöttl
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Murphy @ 2021-01-25 22:47 UTC (permalink / raw)
  To: Jakob Schöttl; +Cc: Btrfs BTRFS

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Only one subvolume can be mounted after replace/balance
  2021-01-25 22:47 ` Chris Murphy
@ 2021-01-27 13:10   ` Jakob Schöttl
  2021-01-27 20:56     ` Chris Murphy
  0 siblings, 1 reply; 4+ messages in thread
From: Jakob Schöttl @ 2021-01-27 13:10 UTC (permalink / raw)
  To: Chris Murphy; +Cc: Btrfs BTRFS

Thank you Chris, it's resolved now, see below.

Am 25.01.21 um 23:47 schrieb Chris Murphy:
> 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.
Oh, I didn't notice that the pool was already mounted (via fstab).
The filesystem where out of space and I had to resize both disks 
separately. And I had to mount with -o skip_balance for that. Now it 
works again.

>> 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.
That was, what I did before my actual problem occurred. But it's 
resolved now.

>> 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
I didn't want to convert to a new profile. I thought btrfs replace 
automatically uses the same profile as the pool?

Regards, Jakob


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Only one subvolume can be mounted after replace/balance
  2021-01-27 13:10   ` Jakob Schöttl
@ 2021-01-27 20:56     ` Chris Murphy
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Murphy @ 2021-01-27 20:56 UTC (permalink / raw)
  To: Jakob Schöttl; +Cc: Chris Murphy, Btrfs BTRFS

On Wed, Jan 27, 2021 at 6:10 AM Jakob Schöttl <jschoett@gmail.com> wrote:
>
> Thank you Chris, it's resolved now, see below.
>
> Am 25.01.21 um 23:47 schrieb Chris Murphy:
> > 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.
> Oh, I didn't notice that the pool was already mounted (via fstab).
> The filesystem where out of space and I had to resize both disks
> separately. And I had to mount with -o skip_balance for that. Now it
> works again.
>
> >> 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.
> That was, what I did before my actual problem occurred. But it's
> resolved now.
>
> >> 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
> I didn't want to convert to a new profile. I thought btrfs replace
> automatically uses the same profile as the pool?

Btrfs replace does not change the profile. But you reported mixed
profile block groups, which means conversion is indicated to make sure
they're al the same. Please post:

sudo btrfs fi us /mnt

Let's see what the block groups are and what you want them to be and
then see what conversion command might be indicated.


-- 
Chris Murphy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-27 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-23 14:48 Only one subvolume can be mounted after replace/balance Jakob Schöttl
2021-01-25 22:47 ` Chris Murphy
2021-01-27 13:10   ` Jakob Schöttl
2021-01-27 20:56     ` Chris Murphy

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.