All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asif Youssuff <yoasif@gmail.com>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Chris Murphy <lists@colorremedies.com>, Qu Wenruo <wqu@suse.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Filesystem goes readonly soon after mount, cannot free space or rebalance
Date: Tue, 27 Jul 2021 17:58:33 -0400	[thread overview]
Message-ID: <CAHw5_hkP0v1YT=R2jVkjXNroibnLLV=5cMZGUMEE7BvDquASbw@mail.gmail.com> (raw)
In-Reply-To: <CAHw5_h=izT2+AzXFK03uETYM2go=mKnSWYkW_5ki-36fkoYaNg@mail.gmail.com>

Hi all,

Just checking in to see if there are any other ideas or upcoming
possible fixes on the horizon.

Thanks,
Asif

On Wed, Jun 23, 2021 at 12:24 PM Asif Youssuff <yoasif@gmail.com> wrote:
>
> On Wed, Jun 23, 2021 at 5:38 AM Qu Wenruo <quwenruo.btrfs@gmx.com> wrote:
> >
> >
> >
> > On 2021/6/23 下午5:32, Asif Youssuff wrote:
> > > On Tue, Jun 22, 2021 at 5:33 PM Chris Murphy <lists@colorremedies.com> wrote:
> > >>
> > >> On Tue, Jun 22, 2021 at 12:37 AM Asif Youssuff <yoasif@gmail.com> wrote:
> > >>
> > >>> I went ahead and also created two partitions each on the two new usb
> > >>> disks (for a two of four new partitions) and added them to the btrfs
> > >>> filesystem using "btrfs device add", then removing a snapshot followed
> > >>> by a "btrfs fi sync". The filesystem still goes ro after a while.
> > >>
> > >> Yeah Qu is correct, and I had it wrong. Two devices have enough space
> > >> for a new metadata BG, but no other disks. And it requires four. All
> > >> you need is to add two but it won't even let you add one before it
> > >> goes ro. So it's stuck. Until there is a kernel fix for this, it's
> > >> permanently read-only (unless we're missing some other work around).
> > >
> > > Hmm, would this be something that would be fixed in the near term?
> > > Just wondering how long I'd have to leave this as ro.
> > >
> > > Happy to continue to try any other ideas of course, but I'd rather not
> > > destroy the fs and start over.
> >
> > The problem is, I don't see why we can't do anything, including adding a
> > new device.
> >
> >  From the fi df output, we still have around 512M metadata free space,
> > it means unless there is something wrong with globalrsv, we should be
> > able to add new devices, which doesn't require much new space.
> >
> > For the worst case, I can craft a btrfs-progs program to manually
> > degrade all your RAID1C3/C4 chunks to SINGLE.
> >
> > By that you can have tons of space left, but that should be the last
> > thing to do IMHO.
> >
> > Currently I prefer to find a way to stop all background work like
> > balance/subvolume deletion, and try to add two new devices to the array,
> > then continue.
> >
> > I still can't get why "btrfs device add" would success while "btrfs fi
> > show" shows no new device.
> >
> > The new devices to add are really blank new devices, right? Not some
> > disks already used by btrfs?
>
> Yes, absolutely. I even formatted them as ext4 and rebooted in order
> to ensure that btrfs processes would not be acting on them until I did
> btrfs device add.
>
> Once I run btrfs device add, the filesystem type shows up in gparted
> as "unknown" - eg:
>
> /dev/sdk1           2048 15187967 15185920  7.2G 83 Linux
> /dev/sdk2       15187968 30375935 15187968  7.2G 83 Linux
>
> I am also adding the devices like what Paul jones suggested - like:
>
> sudo mount /media/camino/ && sudo btrfs device add -f /dev/sdl1
> /dev/sdl2 /dev/sdk1 /dev/sdk2 /media/camino/
>
> >
> > Thanks,
> > Qu
> > >
> > >>
> > >>
> > >>> Would mounting as degraded make it possible to add the disks and have
> > >>> it stick?
> > >>
> > >> No, that's even more fragile and you're sure to run into myriad
> > >> degraded raid5 bugs, not least of which are the bogus errors. And it
> > >> won't be obvious which ones are important and which ones are not.
> > >>
> > >>
> > >> --
> > >> Chris Murphy
> > >
> > >
> > >
>
>
>
> --
> Thanks,
> Asif



-- 
Thanks,
Asif

  parent reply	other threads:[~2021-07-27 21:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-19  5:16 Filesystem goes readonly soon after mount, cannot free space or rebalance Asif Youssuff
2021-06-19 18:47 ` Chris Murphy
2021-06-20  9:11   ` Asif Youssuff
     [not found]   ` <ab0e8705-e18f-90eb-c42b-318c04a2101c@gmail.com>
2021-06-20 16:24     ` Chris Murphy
2021-06-20 16:49       ` Chris Murphy
2021-06-21  2:04       ` Asif Youssuff
2021-06-21  3:27         ` Chris Murphy
2021-06-21  6:53           ` Asif Youssuff
2021-06-21  7:42 ` Qu Wenruo
2021-06-21 23:14   ` Asif Youssuff
2021-06-21 23:36     ` Qu Wenruo
2021-06-22  0:12       ` Asif Youssuff
2021-06-22  0:25         ` Qu Wenruo
2021-06-22  0:50           ` Asif Youssuff
2021-06-22  0:55             ` Asif Youssuff
2021-06-22  3:15               ` Qu Wenruo
2021-06-22  4:54                 ` Asif Youssuff
2021-06-22  5:03                   ` Qu Wenruo
2021-06-22  6:37                     ` Asif Youssuff
2021-06-22 21:33                       ` Chris Murphy
2021-06-23  9:32                         ` Asif Youssuff
2021-06-23  9:37                           ` Qu Wenruo
2021-06-23  9:53                             ` Forza
2021-06-23 16:24                             ` Asif Youssuff
2021-06-23 16:29                               ` Martin Raiber
2021-07-27 21:58                               ` Asif Youssuff [this message]
2021-06-23  5:32 ` Zygo Blaxell
2021-06-23  6:08   ` Paul Jones
2021-06-23  9:22   ` Asif Youssuff

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='CAHw5_hkP0v1YT=R2jVkjXNroibnLLV=5cMZGUMEE7BvDquASbw@mail.gmail.com' \
    --to=yoasif@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=quwenruo.btrfs@gmx.com \
    --cc=wqu@suse.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 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.