Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Drew Bloechl <drew@cesspool.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: Recovery from full metadata with all device space consumed?
Date: Thu, 19 Apr 2018 16:12:39 -0700	[thread overview]
Message-ID: <20180419231239.GD24508@bottomless.cesspool.net> (raw)
In-Reply-To: <20180419224357.GI13551@carfax.org.uk>

On Thu, Apr 19, 2018 at 10:43:57PM +0000, Hugo Mills wrote:
>    Given that both data and metadata levels here require paired
> chunks, try adding _two_ temporary devices so that it can allocate a
> new block group.

Thank you very much, that seems to have done the trick:

# fallocate -l 4GiB /var/tmp/btrfs-temp-1
# fallocate -l 4GiB /var/tmp/btrfs-temp-2
# losetup -f /var/tmp/btrfs-temp-1
# losetup -f /var/tmp/btrfs-temp-2
# btrfs device add /dev/loop0 /broken
Performing full device TRIM (4.00GiB) ...
# btrfs device add /dev/loop1 /broken
Performing full device TRIM (4.00GiB) ...
# btrfs balance start -v -dusage=1 /broken
Dumping filters: flags 0x1, state 0x0, force is off
  DATA (flags 0x2): balancing, usage=1

I'm guessing that'll take a while to complete, but meanwhile, in another
terminal:

# btrfs fi show /broken
Label: 'mon_data'  uuid: 85e52555-7d6d-4346-8b37-8278447eb590
	Total devices 6 FS bytes used 69.53GiB
	devid    1 size 931.51GiB used 731.02GiB path /dev/sda1
	devid    2 size 931.51GiB used 731.02GiB path /dev/sdb1
	devid    3 size 931.51GiB used 730.03GiB path /dev/sdc1
	devid    4 size 931.51GiB used 730.03GiB path /dev/sdd1
	devid    5 size 4.00GiB used 1.00GiB path /dev/loop0
	devid    6 size 4.00GiB used 1.00GiB path /dev/loop1

# btrfs fi df /broken
Data, RAID0: total=2.77TiB, used=67.00GiB
System, RAID1: total=8.00MiB, used=192.00KiB
Metadata, RAID1: total=4.00GiB, used=2.49GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

Do I understand correctly that this could require up to 3 extra devices,
if for instance you arrived in this situation with a RAID6 data profile?
Or is the number even higher for profiles like RAID10?

  reply	other threads:[~2018-04-19 23:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 22:08 Recovery from full metadata with all device space consumed? Drew Bloechl
2018-04-19 22:32 ` Timofey Titovets
2018-04-20  9:17   ` Duncan
2018-04-19 22:43 ` Hugo Mills
2018-04-19 23:12   ` Drew Bloechl [this message]
2018-04-19 23:19     ` Hugo Mills

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=20180419231239.GD24508@bottomless.cesspool.net \
    --to=drew@cesspool.net \
    --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