Skip to content

can't cancel a 'balance' in progress #865

Open
@xuefer

Description

@xuefer

the problem:

# btrfs fi balance cancel /d
ERROR: balance cancel on '/d' failed: Not in progress

# btrfs balance start -mconvert=dup,soft   /d/
ERROR: unable to start balance, another exclusive operation 'balance' in progress

some info:

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sde      8:64   0  12.7T  0 disk /d
# lsblk -z
NAME   ZONED        ZONE-SZ ZONE-NR ZONE-AMAX ZONE-OMAX ZONE-APP ZONE-WGRAN
sde    host-managed    256M   52156         0       128     672K         4K

# dmesg -T | tail -n3; date
[Thu Aug  8 22:50:44 2024] BTRFS info (device sde): found 1330 extents, stage: move data extents
[Thu Aug  8 22:51:02 2024] BTRFS info (device sde): reclaiming chunk 73810086723584 with 6% used 93% unusable
[Thu Aug  8 22:51:02 2024] BTRFS info (device sde): relocating block group 73810086723584 flags metadata|dup
Thu Aug  8 22:49:48 CST 2024

# cat /sys/fs/btrfs/8d4bcd03-3f85-4aae-a7dc-a302f1d6d8bb/allocation/data/bg_reclaim_threshold
75

I'm not sure but there's no btrfs-progs doing balance by checking "ps -efH | grep balance", but dmesg shows the reclaim is in progress. I'd guess it was triggered by bg_reclaim_threshold. I suppose it can be canceled but it's not recognized by btrfs-progs

btrfs --version

btrfs-progs v6.10

reproducible with both v6.10 v6.9.2

uname -a

Linux XueferDG 6.9.9-gentoo #1 SMP PREEMPT_DYNAMIC Tue Jul 16 02:05:40 CST 2024 x86_64 Intel(R) Xeon(R) CPU D-1581 @ 1.80GHz GenuineIntel GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugkernelsomething in kernel has to be done too

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions