Re: balancing metadata fails with no space left on device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Freitag, 4. Mai 2012 schrieb Martin Steigerwald:
> Am Freitag, 4. Mai 2012 schrieb Martin Steigerwald:
> > Hi!
> > 
> > merkaba:~> btrfs balance start -m /
> > ERROR: error during balancing '/' - No space left on device
> > There may be more info in syslog - try dmesg | tail
> > merkaba:~#19> dmesg | tail -22
> > [   62.918734] CPU0: Package power limit normal
> > [  525.229976] btrfs: relocating block group 20422066176 flags 1
> > [  526.940452] btrfs: found 3048 extents
> > [  528.803778] btrfs: found 3048 extents
[…]
> > [  635.906517] btrfs: found 1 extents
> > [  636.038096] btrfs: 1 enospc errors during balance
> > 
> > 
> > merkaba:~> btrfs filesystem show
> > failed to read /dev/sr0
> > Label: 'debian'  uuid: […]
> > 
> >         Total devices 1 FS bytes used 7.89GB
> >         devid    1 size 18.62GB used 17.58GB path /dev/dm-0
> > 
> > Btrfs Btrfs v0.19
> > merkaba:~> btrfs filesystem df /
> > Data: total=15.52GB, used=7.31GB
> > System, DUP: total=32.00MB, used=4.00KB
> > System: total=4.00MB, used=0.00
> > Metadata, DUP: total=1.00GB, used=587.83MB
> 
> I thought data tree might have been to big, so out of curiousity I
> tried a full balance. It shrunk the data tree but it failed as well:
> 
> merkaba:~> btrfs balance start /
> ERROR: error during balancing '/' - No space left on device
> There may be more info in syslog - try dmesg | tail
> merkaba:~#19> dmesg | tail -63
> [   89.306718] postgres (2876): /proc/2876/oom_adj is deprecated,
> please use /proc/2876/oom_score_adj instead.
> [  159.939728] btrfs: relocating block group 21994930176 flags 34
> [  160.010427] btrfs: relocating block group 21860712448 flags 1
> [  161.188104] btrfs: found 6 extents
> [  161.507388] btrfs: found 6 extents
[…]
> [  335.897953] btrfs: relocating block group 1103101952 flags 1
> [  347.888295] btrfs: found 28458 extents
> [  352.736987] btrfs: found 28458 extents
> [  353.099659] btrfs: 1 enospc errors during balance
> 
> merkaba:~> btrfs filesystem df /
> Data: total=10.00GB, used=7.31GB
> System, DUP: total=64.00MB, used=4.00KB
> System: total=4.00MB, used=0.00
> Metadata, DUP: total=1.12GB, used=587.20MB
> 
> merkaba:~> btrfs filesystem show
> failed to read /dev/sr0
> Label: 'debian'  uuid: […]
>         Total devices 1 FS bytes used 7.88GB
>         devid    1 size 18.62GB used 12.38GB path /dev/dm-0
> 
> 
> For the sake of it I tried another time. It failed again:
> 
> martin@merkaba:~> dmesg | tail -32
> [  353.099659] btrfs: 1 enospc errors during balance
> [  537.057375] btrfs: relocating block group 32833011712 flags 36
[…]
> [  641.479140] btrfs: relocating block group 22062039040 flags 34
> [  641.695614] btrfs: relocating block group 22028484608 flags 34
> [  641.840179] btrfs: found 1 extents
> [  641.965843] btrfs: 1 enospc errors during balance
> 
> 
> merkaba:~#19> btrfs filesystem df /
> Data: total=10.00GB, used=7.31GB
> System, DUP: total=32.00MB, used=4.00KB
> System: total=4.00MB, used=0.00
> Metadata, DUP: total=1.12GB, used=586.74MB
> merkaba:~> btrfs filesystem show
> failed to read /dev/sr0
> Label: 'debian'  uuid: […]
>         Total devices 1 FS bytes used 7.88GB
>         devid    1 size 18.62GB used 12.32GB path /dev/dm-0
> 
> Btrfs Btrfs v0.19
> 
> 
> Well, in order to be gentle to the SSD again I stop my experiments now
> ;).

I had subjective impression that the speed of the BTRFS filesystem 
decreased after all these

Anyway, after reading the a -musage hint by Ilya in thread

Is it possible to reclaim block groups once they ar allocated to data or 
metadata?


I tried:

merkaba:~> btrfs filesystem df /
Data: total=10.00GB, used=7.34GB
System, DUP: total=32.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.12GB, used=586.39MB

merkaba:~> btrfs balance start -musage=1 / 
Done, had to relocate 2 out of 13 chunks

merkaba:~> btrfs filesystem df /          
Data: total=10.00GB, used=7.34GB
System, DUP: total=32.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.00GB, used=586.39MB

So this worked.

But I wasn´t able to specify less than a Gig:

merkaba:~> btrfs balance start -musage=0.8 /
Invalid usage argument: 0.8
merkaba:~#1> btrfs balance start -musage=700M /
Invalid usage argument: 700M


When I try without usage I get the old behavior back:

merkaba:~#1> btrfs balance start -m /          
ERROR: error during balancing '/' - No space left on device
There may be more info in syslog - try dmesg | tail


merkaba:~> btrfs balance start -musage=1 /   
Done, had to relocate 2 out of 13 chunks
merkaba:~> btrfs balance start -musage=1 /
Done, had to relocate 1 out of 12 chunks
merkaba:~> btrfs balance start -musage=1 /
Done, had to relocate 1 out of 12 chunks
merkaba:~> btrfs balance start -musage=1 /
Done, had to relocate 1 out of 12 chunks
merkaba:~> btrfs filesystem df /
Data: total=10.00GB, used=7.34GB
System, DUP: total=32.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=1.00GB, used=586.41MB

Ciao,
-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux