linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Murphy <lists@colorremedies.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>, Stefan K <shadow_7@gmx.net>
Subject: Re: raid1 mount as read only
Date: Mon, 18 Feb 2019 13:25:15 -0700	[thread overview]
Message-ID: <CAJCQCtTRseEwoN4cbsAaE_YZz5hUYF1oCPB-aRvz7q2mYWJfMw@mail.gmail.com> (raw)
In-Reply-To: <1788794.QoebbjtCvL@t460-skr>

On Mon, Feb 18, 2019 at 2:01 AM Stefan K <shadow_7@gmx.net> wrote:
>
> Hello,
>
> I've played a little bit with raid1:
> my steps was:
> 1. create a raid1 with btrfs (add device; balance start -mconvert=raid1 -dconvert=raid1 /)
> 2.  after finishing, i shutdown the server and remove a device and start it again,
> 3. it works (i used degraded options in fstab)
> 4. I shutdown the server, add the 'old' device, start it and run a btrfs balance

What exact command? There's a very good chance there are newly created
single profile block groups that must be converted, so it requires
another -mconvert and maybe also a -dconvert, depending on what block
groups have been created during the degraded mount.

> 5. until here everything is fine
> 6. I shutdown the server, remove the other harddisk, and start it,
> 7. it works
> 8. I shutdown the server, add the 'old' device, start it and try a btrfs balance
> 9. but now the FS is mounted as read only
>
> I got the following messages in dmesg:
> [    6.401740] BTRFS: device fsid b997e926-ab95-46d0-a9be-da52aa09203d devid 1 transid 3570 /dev/sda1
> [    6.403079] BTRFS info (device sda1): allowing degraded mounts
> [    6.403084] BTRFS info (device sda1): disk space caching is enabled
> [    6.403086] BTRFS info (device sda1): has skinny extents
> [    6.405878] BTRFS warning (device sda1): devid 2 uuid 09a7c9f6-9a13-4852-bca6-2d9120f388d4 missing
> [    6.409108] BTRFS info (device sda1): detected SSD devices, enabling SSD mode
>
> [    6.652411] BTRFS info (device sda1): allowing degraded mounts
> [    6.652414] BTRFS info (device sda1): disk space caching is enabled
> [    6.652416] BTRFS warning (device sda1): too many missing devices, writeable remount is not allowed


Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux

Kernel is too old, it doesn't have the patches that permit mounting rw
degraded more than one time before fully converting everything. You'll
need a newer kernel to permit the mount of this file system, and then
you'll need to make sure there are only raid1 block groups. I know
this is not obvious.

Not related to your problem but btrfs-progs 4.7 is really old too.
It's a common issue on the very stable distros like Debian and RHEL,
but strictly speaking if you have problems with such tools and
kernels, you need to get support from the distro. One upstream mailing
lists, no matter what file system, it's very development oriented with
focus on fixing bugs in the mainline and development kernels.

Anyway it should be safe to get a recent LiveOS. Unfortunately I'm not
certain what kernel this behavior changed in, I know for sure kernel
5.0.0 rc's have it, and I'm almost positive 4.20 has it. I'm not sure
if 4.18 has it.


-- 
Chris Murphy

      reply	other threads:[~2019-02-18 20:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  9:01 raid1 mount as read only Stefan K
2019-02-18 20:25 ` Chris Murphy [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=CAJCQCtTRseEwoN4cbsAaE_YZz5hUYF1oCPB-aRvz7q2mYWJfMw@mail.gmail.com \
    --to=lists@colorremedies.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=shadow_7@gmx.net \
    /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).