From: Hugo Mills <hugo@carfax.org.uk>
To: ojab // <ojab@ojab.ru>
Cc: Chris Murphy <lists@colorremedies.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: `btrfs dev del` fails with `No space left on device`
Date: Tue, 30 Aug 2016 10:35:00 +0000 [thread overview]
Message-ID: <20160830103500.GL20440@carfax.org.uk> (raw)
In-Reply-To: <CAKzrAgRQ6gkEgWZwG1emf0w5RURkj93L_A4--OK-PaPEf17XvQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2808 bytes --]
On Tue, Aug 30, 2016 at 10:22:24AM +0000, ojab // wrote:
> On Mon, Aug 29, 2016 at 9:05 PM, Chris Murphy <lists@colorremedies.com> wrote:
> > On Mon, Aug 29, 2016 at 10:04 AM, ojab // <ojab@ojab.ru> wrote:
> > What do you get for 'btrfs fi us <mp>'
>
> $ sudo btrfs fi us /mnt/xxx/
> Overall:
> Device size: 3.64TiB
> Device allocated: 1.82TiB
> Device unallocated: 1.82TiB
> Device missing: 0.00B
> Used: 1.81TiB
> Free (estimated): 1.83TiB (min: 943.55GiB)
> Data ratio: 1.00
> Metadata ratio: 2.00
> Global reserve: 512.00MiB (used: 0.00B)
>
> Data,RAID0: Size:1.81TiB, Used:1.80TiB
> /dev/sdb1 928.48GiB
> /dev/sdc1 928.48GiB
>
> Metadata,RAID1: Size:3.00GiB, Used:2.15GiB
> /dev/sdb1 3.00GiB
> /dev/sdc1 3.00GiB
>
> System,RAID1: Size:32.00MiB, Used:176.00KiB
> /dev/sdb1 32.00MiB
> /dev/sdc1 32.00MiB
>
> Unallocated:
> /dev/sdb1 1.01MiB
> /dev/sdc1 1.00MiB
> /dev/sdd1 1.82TiB
Basically, your FS is full. Note that replacing just one of the
devices in a RAID-0 array with a larger one is not going to help. What
you really need here is "single", not RAID-0. I would probably try
converting to single first (which should move quite a lot of it to the
new device anyway), and then the device delete:
btrfs balance start -dconvert=single,soft /mountpoint
btrfs dev delete /dev/sdc1 /mountpoint
Hugo.
> > You can see what the state of block groups are with btrfs-debugfs
> > which is in kdave btrfs-progs git. Chances are you need a larger
> > value, -dusage=15 -musage=15 to free up space on devid 1 and 2. Then
> > maybe devid 3 can be removed.
>
> btrfs-debugfs output:
> https://gist.github.com/ojab/a3c59983e8fb6679b8fdc0e88c0c9e60
> Before `delete` the was about 60Gb of free space, looks like it was
> filled during `delete` (I've seen similar behavior during `btrfs fi
> defrag`) and I should use `-dusage=69` and up.
>
> I don't quite understand what exactly btrfs is trying to do: I assume
> that block groups should be relocated to the new/empty drive, but
> during the delete `btrfs fi us` shows
> Unallocated:
> /dev/sdc1 16.00EiB
>
> so deleted partition is counted as maximum possible empty drive and
> blocks are relocated to it instead of new/empty drive? (kernel-4.7.2 &
> btrfs-progs-4.7.1 here)
> Is there any way to see where and why block groups are relocated
> during `delete`?
>
> //wbr ojab
--
Hugo Mills | Everything simple is false. Everything which is
hugo@... carfax.org.uk | complex is unusable
http://carfax.org.uk/ |
PGP: E2AB1DE4 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2016-08-30 10:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 16:04 `btrfs dev del` fails with `No space left on device` ojab //
2016-08-29 21:05 ` Chris Murphy
2016-08-30 10:22 ` ojab //
2016-08-30 10:35 ` Hugo Mills [this message]
2016-08-30 17:13 ` Chris Murphy
2016-08-30 20:10 ` ojab //
-- strict thread matches above, loose matches on Subject: below --
2016-08-29 16:02 ojab //
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=20160830103500.GL20440@carfax.org.uk \
--to=hugo@carfax.org.uk \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=ojab@ojab.ru \
/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).