All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Lehmann <schmorp@schmorp.de>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs dev del not transaction protected?
Date: Fri, 20 Dec 2019 18:20:43 +0100	[thread overview]
Message-ID: <20191220172043.GA5965@schmorp.de> (raw)
In-Reply-To: <204287e5-8aca-3a51-9bc9-be577299bfd6@gmx.com>

> > Just while I was writing this mail, on 5.4.5, the _newly created_ btrfs
> > filesystem I restored to went into readonly mode with ENOSPC. Another
> > hardware problem?
>
> But mounting with clear_cache,space_cache=v2 didn't help, df still shows 0
> bytes free, "btrfs f us" still shows 3tb unallocated. I'll play around with
> it more...

clear_cache didn't work, but btrfsck --clear-space-cache v1 and .. v2 did
work:

   Filesystem               Size  Used Avail Use% Mounted on
   /dev/mapper/xmnt-cold15   27T   23T  3.6T  87% /cold1

Which is rather insane, as I can't see how this filesystem was ever not
mounted without -o space_cache=v2.

Looking at btrfs f u again...

   Metadata,single: Size:1.22GiB, Used:0.00B (0.00%)
      /dev/mapper/xmnt-cold13         1.22GiB

   Metadata,RAID1: Size:27.92GiB, Used:27.90GiB (99.91%)
      /dev/mapper/xmnt-cold15        25.46GiB
      /dev/mapper/xmnt-cold12        24.46GiB
      /dev/mapper/xmnt-cold13         5.92GiB

   System,RAID1: Size:32.00MiB, Used:2.16MiB (6.74%)
      /dev/mapper/xmnt-cold15        32.00MiB
      /dev/mapper/xmnt-cold12        32.00MiB

   Unallocated:
      /dev/mapper/xmnt-cold15         1.00MiB
      /dev/mapper/xmnt-cold12         1.00MiB
      /dev/mapper/xmnt-cold13         3.24TiB

Did this happen because metadata is raid1 and two of the disks were full,
and for some reason, btrfsck freed up a tiny bit of space somewhere?

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp@schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

      parent reply	other threads:[~2019-12-20 17:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-20  4:05 btrfs dev del not transaction protected? Marc Lehmann
2019-12-20  5:24 ` Qu Wenruo
2019-12-20  6:37   ` Marc Lehmann
2019-12-20  7:10     ` Qu Wenruo
2019-12-20 13:27       ` Marc Lehmann
2019-12-20 13:41         ` Qu Wenruo
2019-12-20 16:53           ` Marc Lehmann
2019-12-20 17:24             ` Remi Gauvin
2019-12-20 17:50               ` Marc Lehmann
2019-12-20 18:00               ` Marc Lehmann
2019-12-20 18:28                 ` Eli V
2019-12-20 20:24             ` Chris Murphy
2019-12-20 23:30               ` Marc Lehmann
2019-12-21 20:06               ` Zygo Blaxell
2019-12-21  1:32             ` Qu Wenruo
2019-12-20 17:07           ` Marc Lehmann
2019-12-21  1:23             ` Qu Wenruo
2019-12-20 17:20           ` Marc Lehmann [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=20191220172043.GA5965@schmorp.de \
    --to=schmorp@schmorp.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo.btrfs@gmx.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.