From: Martin Steigerwald <martin@lichtvoll.de>
To: Marc Haber <mh+linux-btrfs@zugschlus.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Again, no space left on device while rebalancing and recipe doesnt work
Date: Sun, 28 Feb 2016 00:15:21 +0100 [thread overview]
Message-ID: <1595760.q3He7oiP70@merkaba> (raw)
In-Reply-To: <20160227211450.GS26042@torres.zugschlus.de>
On Samstag, 27. Februar 2016 22:14:50 CET Marc Haber wrote:
> Hi,
Hi Marc.
> I have again the issue of no space left on device while rebalancing
> (with btrfs-tools 4.4.1 on kernel 4.4.2 on Debian unstable):
>
> mh@fan:~$ sudo btrfs balance start /mnt/fanbtr
> ERROR: error during balancing '/mnt/fanbtr': No space left on device
> mh@fan:~$ sudo btrfs fi show /mnt/fanbtr
> mh@fan:~$ sudo btrfs fi show -m
> Label: 'fanbtr' uuid: 4198d1bc-e3ce-40df-a7ee-44a2d120bff3
> Total devices 1 FS bytes used 116.49GiB
> devid 1 size 417.19GiB used 177.06GiB path /dev/mapper/fanbtr
Hmmm, thats still a ton of space to allocate chunks from.
> mh@fan:~$ sudo btrfs fi df /mnt/fanbtr
> Data, single: total=113.00GiB, used=112.77GiB
> System, DUP: total=32.00MiB, used=48.00KiB
> Metadata, DUP: total=32.00GiB, used=3.72GiB
> GlobalReserve, single: total=512.00MiB, used=0.00B
> mh@fan:~$
>
> The filesystem was recently resized from 300 GB to 420 GB.
>
> Why does btrfs fi show /mnt/fanbtr not give any output? Wy does btrfs
> fi df /mnt/fanbtr say that my data space is only 113 GiB large?
Cause it is.
The "used" in "devid 1" line is btrfs fi sh is "data + 2x system + 2x metadata
= 113 GiB + 2 * 32 GiB + 2 * 32 MiB, i.e. what amount of the size of the
device is allocated for chunks.
The value one line above is what is allocated inside the chunks.
I.e. the line in "devid 1" is "total" of btrfs fi df summed up, and the line
above is "used" in btrfs fi df summed up. And… with more devices you have more
fun.
I suggest:
merkaba:~> btrfs fi usage -T /daten
Overall:
Device size: 235.00GiB
Device allocated: 227.04GiB
Device unallocated: 7.96GiB
Device missing: 0.00B
Used: 225.84GiB
Free (estimated): 8.48GiB (min: 8.48GiB)
Data ratio: 1.00
Metadata ratio: 1.00
Global reserve: 128.00MiB (used: 0.00B)
Data Metadata System
Id Path single single single Unallocated
-- --------- --------- --------- -------- -----------
1 /dev/dm-1 226.00GiB 1.01GiB 32.00MiB 7.96GiB
-- --------- --------- --------- -------- -----------
Total 226.00GiB 1.01GiB 32.00MiB 7.96GiB
Used 225.48GiB 371.83MiB 48.00KiB
as that is much clearer to read IMHO.
and
merkaba:~> btrfs device usage /daten
/dev/dm-1, ID: 1
Device size: 235.00GiB
Data,single: 226.00GiB
Metadata,single: 1.01GiB
System,single: 32.00MiB
Unallocated: 7.96GiB
(although thats include in the filesystem usage output)
Or for a BTRFS RAID 1:
merkaba:~> btrfs fi usage -T /home
Overall:
Device size: 340.00GiB
Device allocated: 340.00GiB
Device unallocated: 2.00MiB
Device missing: 0.00B
Used: 306.47GiB
Free (estimated): 14.58GiB (min: 14.58GiB)
Data ratio: 2.00
Metadata ratio: 2.00
Global reserve: 512.00MiB (used: 0.00B)
Data Metadata System
Id Path RAID1 RAID1 RAID1 Unallocated
-- --------- --------- -------- -------- -----------
1 /dev/dm-0 163.94GiB 6.03GiB 32.00MiB 1.00MiB
2 /dev/dm-3 163.94GiB 6.03GiB 32.00MiB 1.00MiB
-- --------- --------- -------- -------- -----------
Total 163.94GiB 6.03GiB 32.00MiB 2.00MiB
Used 149.36GiB 3.88GiB 48.00KiB
merkaba:~> btrfs device usage /home
/dev/dm-0, ID: 1
Device size: 170.00GiB
Data,RAID1: 163.94GiB
Metadata,RAID1: 6.03GiB
System,RAID1: 32.00MiB
Unallocated: 1.00MiB
/dev/dm-3, ID: 2
Device size: 170.00GiB
Data,RAID1: 163.94GiB
Metadata,RAID1: 6.03GiB
System,RAID1: 32.00MiB
Unallocated: 1.00MiB
(this is actually the situation asking for hung task trouble with kworker
threads seeking for free space inside chunks, as no new chunks can be
allocated, lets hope kernel 4.4 finally really has fixes for this)
> btrfs balance start -dusage=5 works up to -dusage=100:
>
> mh@fan:~$ sudo btrfs balance start -dusage=100 /mnt/fanbtr
> Done, had to relocate 111 out of 179 chunks
> mh@fan:~$ sudo btrfs balance start -dusage=100 /mnt/fanbtr
> Done, had to relocate 111 out of 179 chunks
> mh@fan:~$ sudo btrfs balance start -dusage=100 /mnt/fanbtr
> Done, had to relocate 110 out of 179 chunks
> mh@fan:~$ sudo btrfs balance start -dusage=100 /mnt/fanbtr
> Done, had to relocate 109 out of 179 chunks
> mh@fan:~$ sudo btrfs balance start /mnt/fanbtr
> ERROR: error during balancing '/mnt/fanbtr': No space left on device
> mh@fan:~$
>
> What is going on here? How do I get away from here?
Others may have better tips, but what can always work is:
Adding a new device temporarily, doing the balance and then removing it.
Before that I´d try to balance the metadata chunks, cause
> Metadata, DUP: total=32.00GiB, used=3.72GiB
32 GiB chunks allocated, only 3,72 GiB used.
Maybe that way you can gain more free space to have a full balance run.
Also note that it is not necessary to do a full balance in case everything
works okayish.
Thanks,
--
Martin
next prev parent reply other threads:[~2016-02-27 23:15 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 21:14 Again, no space left on device while rebalancing and recipe doesnt work Marc Haber
2016-02-27 23:15 ` Martin Steigerwald [this message]
2016-02-28 0:08 ` Marc Haber
2016-02-28 0:22 ` Hugo Mills
2016-02-28 8:40 ` Marc Haber
2016-02-29 1:56 ` Qu Wenruo
2016-02-29 15:33 ` Marc Haber
2016-03-01 0:45 ` Qu Wenruo
[not found] ` <20160301065448.GJ2334@torres.zugschlus.de>
2016-03-01 7:24 ` Qu Wenruo
2016-03-01 8:13 ` Qu Wenruo
[not found] ` <20160301161659.GR2334@torres.zugschlus.de>
2016-03-03 2:02 ` Qu Wenruo
2016-03-01 20:51 ` Duncan
2016-03-05 14:28 ` Marc Haber
2016-03-03 0:28 ` Dāvis Mosāns
2016-03-03 3:42 ` Qu Wenruo
2016-03-03 4:57 ` Duncan
2016-03-03 15:39 ` Dāvis Mosāns
2016-03-04 12:31 ` Duncan
2016-03-04 12:35 ` Hugo Mills
2016-03-27 12:10 ` Martin Steigerwald
2016-03-27 23:12 ` Duncan
2016-03-05 14:39 ` Marc Haber
2016-03-05 19:34 ` Chris Murphy
2016-03-05 20:09 ` Marc Haber
2016-03-06 6:43 ` Duncan
2016-03-06 20:27 ` Chris Murphy
2016-03-06 20:37 ` Chris Murphy
2016-03-07 8:47 ` Marc Haber
2016-03-07 8:42 ` Marc Haber
2016-03-07 18:39 ` Chris Murphy
2016-03-07 18:56 ` Austin S. Hemmelgarn
2016-03-07 19:07 ` Chris Murphy
2016-03-07 19:33 ` Marc Haber
2016-03-12 21:36 ` Marc Haber
2016-03-07 19:44 ` Chris Murphy
2016-03-07 20:43 ` Duncan
2016-03-07 22:44 ` Chris Murphy
2016-03-12 21:30 ` Marc Haber
2016-03-07 8:30 ` Marc Haber
2016-03-07 20:07 ` Duncan
2016-03-07 8:56 ` Marc Haber
2016-03-12 19:57 ` Marc Haber
2016-03-13 19:43 ` Chris Murphy
2016-03-13 20:50 ` Marc Haber
2016-03-13 21:31 ` Chris Murphy
2016-03-12 21:14 ` Marc Haber
2016-03-13 11:58 ` New file system with same issue (was: Again, no space left on device while rebalancing and recipe doesnt work) Marc Haber
2016-03-13 13:17 ` Andrew Vaughan
2016-03-13 16:56 ` Marc Haber
2016-03-13 17:12 ` Duncan
2016-03-13 21:05 ` Marc Haber
2016-03-14 1:05 ` Duncan
2016-03-14 11:49 ` Marc Haber
2016-03-13 19:14 ` Henk Slager
2016-03-13 19:42 ` Henk Slager
2016-03-13 20:56 ` Marc Haber
2016-03-14 0:00 ` Henk Slager
2016-03-15 7:20 ` Marc Haber
2016-03-14 12:07 ` Marc Haber
2016-03-14 12:48 ` New file system with same issue Holger Hoffstätte
2016-03-14 20:13 ` Marc Haber
2016-03-15 10:52 ` Holger Hoffstätte
2016-03-15 13:46 ` Marc Haber
2016-03-15 13:54 ` Austin S. Hemmelgarn
2016-03-15 14:09 ` Marc Haber
2016-03-17 1:17 ` A good "Boot Maintenance" scheme (WAS: New file system with same issue) Robert White
2016-03-14 13:46 ` New file system with same issue (was: Again, no space left on device while rebalancing and recipe doesnt work) Henk Slager
2016-03-14 20:05 ` Marc Haber
2016-03-14 20:39 ` Henk Slager
2016-03-14 21:59 ` Chris Murphy
2016-03-14 23:22 ` Henk Slager
2016-03-15 7:16 ` Marc Haber
2016-03-15 12:15 ` Henk Slager
2016-03-15 13:24 ` Marc Haber
2016-03-15 7:07 ` Marc Haber
2016-03-27 12:15 ` Martin Steigerwald
2016-03-15 13:29 ` Marc Haber
2016-03-15 13:42 ` Marc Haber
2016-03-15 16:54 ` Henk Slager
2016-03-27 8:41 ` Current state of old filesystem " Marc Haber
2016-04-01 13:59 ` Again, no space left on device while rebalancing and recipe doesnt work Marc Haber
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=1595760.q3He7oiP70@merkaba \
--to=martin@lichtvoll.de \
--cc=linux-btrfs@vger.kernel.org \
--cc=mh+linux-btrfs@zugschlus.de \
/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).