linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* enospc errors during balance — how to prevent out of space
@ 2024-04-16  6:09 Leszek Dubiel
  2024-04-16  7:54 ` HAN Yuwei
  0 siblings, 1 reply; 9+ messages in thread
From: Leszek Dubiel @ 2024-04-16  6:09 UTC (permalink / raw)
  To: linux-btrfs



Hello :) :)



My disk got full, so I have removed snapshots and
now it has plenty of free space, see:


# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc3       8.2T  7.2T  1.1T  88% /


# btrfs fi show /
Label: none  uuid: ec3525ef-b73a-452a-a4ee-86286252d730
     Total devices 3 FS bytes used 7.11TiB
     devid    1 size 5.43TiB used 5.42TiB path /dev/sdc3
     devid    2 size 5.43TiB used 5.42TiB path /dev/sda3
     devid    3 size 5.43TiB used 5.43TiB path /dev/sdb3


# btrfs fi df /
Data, RAID1: total=8.09TiB, used=7.07TiB
System, RAID1: total=32.00MiB, used=1.38MiB
Metadata, RAID1: total=45.04GiB, used=39.08GiB
GlobalReserve, single: total=512.00MiB, used=32.00KiB





But i got error  NO FREE SPACE.




# btrfs device usage /
/dev/sdc3, ID: 1
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.39TiB
    Metadata,RAID1:         39.04GiB
    System,RAID1:           32.00MiB
    Unallocated:             1.00MiB

/dev/sda3, ID: 2
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.39TiB
    Metadata,RAID1:         38.03GiB
    System,RAID1:           32.00MiB
    Unallocated:             1.00MiB

/dev/sdb3, ID: 3
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.41TiB
    Metadata,RAID1:         13.00GiB
    Unallocated:             1.00MiB





I noticed 1Mb for Unallocated space, so
I have run multiple times balance (data usage filter):

          btrfs balance start -dusage=XX,limit=1 /


and it didn't help.

It even got error no space when balancing:

syslog-2024-04-15T14:20:41.498301+02:00 zefir kernel: [161213.968020] 
BTRFS info (device sdc3): balance: start -dusage=70,limit=3
syslog-2024-04-15T14:20:41.510297+02:00 zefir kernel: [161213.978076] 
BTRFS info (device sdc3): relocating block group 31021491027968 flags 
data|raid1
syslog-2024-04-15T14:20:46.118283+02:00 zefir kernel: [161218.585833] 
BTRFS info (device sdc3): relocating block group 30657484161024 flags 
data|raid1
syslog-2024-04-15T14:20:50.406268+02:00 zefir kernel: [161222.874987] 
BTRFS info (device sdc3): relocating block group 30654262935552 flags 
data|raid1
syslog:2024-04-15T14:21:01.270284+02:00 zefir kernel: [161233.739112] 
BTRFS info (device sdc3): 3 enospc errors during balance
syslog-2024-04-15T14:21:01.270305+02:00 zefir kernel: [161233.739119] 
BTRFS info (device sdc3): balance: ended with status: -28





Then multiple times both for data and metadata:

             btrfs balance start -musage=XX,limit=1 /

             btrfs balance start -dusage=50,limit=1 /




Unallocated space increased:

# btrfs device usage /
/dev/sdc3, ID: 1
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.39TiB
    Metadata,RAID1:         39.04GiB
    System,RAID1:           32.00MiB
    Unallocated:             1.00MiB

/dev/sda3, ID: 2
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.39TiB
    Metadata,RAID1:         38.03GiB
    System,RAID1:           32.00MiB
    Unallocated:             1.00MiB

/dev/sdb3, ID: 3
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.41TiB
    Metadata,RAID1:         13.00GiB
    Unallocated:            21.57MiB



and now I have:

/dev/sdc3, ID: 1
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.36TiB
    Metadata,RAID1:         40.00GiB
    Unallocated:            31.06GiB

/dev/sda3, ID: 2
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.36TiB
    Metadata,RAID1:         36.00GiB
    System,RAID1:           32.00MiB
    Unallocated:            28.06GiB

/dev/sdb3, ID: 3
    Device size:             5.43TiB
    Device slack:            3.50KiB
    Data,RAID1:              5.38TiB
    Metadata,RAID1:         12.00GiB
    System,RAID1:           32.00MiB
    Unallocated:            31.02GiB



Should I run balance quite often to prevent Unallocated space to go as 
low as 1.00MiB?

How to prevent "NO SPACE ERROR" when there is pleny of space left?

Run balance regularly to keep Unallocated space high?



Thank you.
I am using BTRFS in production many, many years (since 2010 maybe?).





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-29 21:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16  6:09 enospc errors during balance — how to prevent out of space Leszek Dubiel
2024-04-16  7:54 ` HAN Yuwei
2024-04-16 15:17   ` Leszek Dubiel
2024-04-16 17:00     ` Forza
2024-04-16 20:07       ` Leszek Dubiel
2024-04-21 19:09         ` Forza
2024-04-21 19:52           ` Leszek Dubiel
2024-04-27 12:03           ` Leszek Dubiel
2024-04-29 21:05           ` Leszek Dubiel

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).