Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Alban Browaeys <alban.browaeys@gmail.com>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Btrfs ENOSPC / Stuck in RO with "exclusive operation balance paused in progress"
Date: Tue, 9 Jun 2026 06:42:34 +0200	[thread overview]
Message-ID: <068e841a-37fd-4fe5-ba2d-0ab93c55830d@gmail.com> (raw)

Hello,

On Debian Forky (testing), I tried to migrate my old SSD btrfs partition 
metadata from the previous default Single to the new DUP default.

The migration stopped halfway far /var and I am now stuck.

I am facing a severe ENOSPC deadlock it seems.


Symptoms:

- The filesystem conversion stopped midway and turned Read-Only during a 
balance operation.

- Attempting to remount or mount as 'rw' fails with ENOSPC.

- Adding a temporary loop device in RAM via 'btrfs device add' fails 
because the FS is read-only.

- Trying to run 'btrfs check --clear-space-cache v2' or cleanup tools at 
cold state fails with: "error: please finish/cancel the running 
replace/balance before running this command".

- 'btrfs balance cancel' cannot be run because mounting 'rw' is 
rejected, and it refuses to target the unmounted block device directly.


I can only boot into init=/bin/sh as of now.


Here are the outputs:


btrfs fi df /var
Data, single: total=65.44GiB, used=49.21GiB
System, single: total=32.00MiB, used=16.00KiB
Metadata, single: total=3.00GiB, used=1.59GiB
GlobalReserve, single: total=181.70MiB, used=0.00B
  prahal  ~  sudo btrfs balance start -mprofiles=single -mconvert=dup /var
ERROR: error during balancing '/var': Read-only file system
There may be more info in syslog - try dmesg | tail
uin 09 02:34:34 hermes kernel: BTRFS info (device sda3): balance: start -mconvert=dup,profiles=single -sconvert=dup,profiles=single
juin 09 02:34:34 hermes kernel: BTRFS info (device sda3): relocating block group 102442729472 flags metadata
juin 09 02:35:02 hermes kernel: BTRFS error (device sda3): failed to run delayed ref for logical 3976462336 num_bytes 8192 type 184 action 1 ref_mod 1: -28
juin 09 02:35:02 hermes kernel: ------------[ cut here ]------------
juin 09 02:35:02 hermes kernel: BTRFS: Transaction aborted (error -28)
juin 09 02:35:02 hermes kernel: WARNING: fs/btrfs/extent-tree.c:2247 at btrfs_run_delayed_refs+0x115/0x120 [btrfs], CPU#0: kworker/u32:11/1370737
juin 09 02:35:02 hermes kernel: Modules linked in: nilfs2 ufs qnx4 hfsplus hfs minix msdos jfs nls_ucs2_utils xfs ext4 mbcache jbd2 crc32c_cryptoapi cpuid exfat uinput rfcomm snd_seq_dummy snd_hrtimer snd_seq x>
juin 09 02:35:02 hermes kernel:  snd_soc_avs nls_ascii snd_soc_hda_codec kvm_intel snd_hda_ext_core nls_cp437 snd_hda_codec vfat snd_hda_core fat kvm btrtl btbcm snd_intel_dspcfg snd_intel_sdw_acpi snd_hwdep gs>
juin 09 02:35:02 hermes kernel:  hid_generic usbhid hid sr_mod cdrom uas usb_storage i915 drm_buddy ttm i2c_algo_bit drm_display_helper sd_mod cec rc_core iTCO_wdt drm_client_lib intel_pmc_bxt xhci_pci watchdog>
juin 09 02:35:02 hermes kernel: CPU: 0 UID: 0 PID: 1370737 Comm: kworker/u32:11 Tainted: P           OE       7.0.9+deb14-amd64 #1 PREEMPT(lazy)  Debian 7.0.9-1
juin 09 02:35:02 hermes kernel: Tainted: [P]=PROPRIETARY_MODULE, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
juin 09 02:35:02 hermes kernel: Hardware name: LENOVO 10M8S14C42/3102, BIOS M16KT71A 09/14/2023
juin 09 02:35:02 hermes kernel: Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs]
juin 09 02:35:02 hermes kernel: RIP: 0010:btrfs_run_delayed_refs+0x117/0x120 [btrfs]
juin 09 02:35:02 hermes kernel: Code: 32 27 c1 48 89 ef e8 e8 54 0f 00 eb 07 e8 f1 22 ed d5 31 db 89 d8 5b 5d 41 5c 41 5d c3 cc cc cc cc 48 8d 3d 5b 7f 31 00 89 de <67> 48 0f b9 3a eb be 66 90 90 90 90 90 90 90>
juin 09 02:35:02 hermes kernel: RSP: 0018:ffffd03f75b87d48 EFLAGS: 00010292
juin 09 02:35:02 hermes kernel: RAX: 0000000000000002 RBX: 00000000ffffffe4 RCX: ffff8ad782c55600
juin 09 02:35:02 hermes kernel: RDX: 0000000002040001 RSI: 00000000ffffffe4 RDI: ffffffffc11dcac0
juin 09 02:35:02 hermes kernel: RBP: ffff8ad783d7bc78 R08: 0000000000000000 R09: ffffffffc0ec412a
juin 09 02:35:02 hermes kernel: R10: fffff4c487b11b40 R11: ffff8ad86c46d460 R12: 0000000000000000
juin 09 02:35:02 hermes kernel: R13: ffff8ad6a2573c00 R14: 0000000000001252 R15: 0000000000000000
juin 09 02:35:02 hermes kernel: FS:  0000000000000000(0000) GS:ffff8adee617c000(0000) knlGS:0000000000000000
juin 09 02:35:02 hermes kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
juin 09 02:35:02 hermes kernel: CR2: 00007ffd95039e68 CR3: 000000072ca2c005 CR4: 00000000003726f0
juin 09 02:35:02 hermes kernel: Call Trace:
juin 09 02:35:02 hermes kernel:  <TASK>
juin 09 02:35:02 hermes kernel:  flush_space+0x126/0x5a0 [btrfs]
juin 09 02:35:02 hermes kernel:  ? btrfs_reduce_alloc_profile+0x5a/0x1d0 [btrfs]
juin 09 02:35:02 hermes kernel:  ? calc_available_free_space.isra.0+0x70/0xc0 [btrfs]
juin 09 02:35:02 hermes kernel:  do_async_reclaim_metadata_space+0x7d/0x180 [btrfs]
juin 09 02:35:02 hermes kernel:  btrfs_async_reclaim_metadata_space+0x54/0x70 [btrfs]
juin 09 02:35:02 hermes kernel:  process_one_work+0x19d/0x3a0
juin 09 02:35:02 hermes kernel:  worker_thread+0x1af/0x320
juin 09 02:35:02 hermes kernel:  ? __pfx_worker_thread+0x10/0x10
juin 09 02:35:02 hermes kernel:  kthread+0xe3/0x120
juin 09 02:35:02 hermes kernel:  ? __pfx_kthread+0x10/0x10
juin 09 02:35:02 hermes kernel:  ret_from_fork+0x2c7/0x350
juin 09 02:35:02 hermes kernel:  ? __pfx_kthread+0x10/0x10
juin 09 02:35:02 hermes kernel:  ret_from_fork_asm+0x1a/0x30
juin 09 02:35:02 hermes kernel:  </TASK>
juin 09 02:35:02 hermes kernel: ---[ end trace 0000000000000000 ]---
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): dumping space info:
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info DATA (sub-group id 0) has 17422733312 free, is full
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info total=70262980608, used=52839989248, pinned=0, reserved=0, may_use=192512, readonly=65536 zone_unusable=0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info METADATA (sub-group id 0) has 442368 free, is full
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info total=3221225472, used=2155544576, pinned=38010880, reserved=10387456, may_use=576634880, readonly=440205312 zone_unusable=0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info SYSTEM (sub-group id 0) has 33538048 free, is not full
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): space_info total=33554432, used=16384, pinned=0, reserved=0, may_use=0, readonly=0 zone_unusable=0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): global_block_rsv: size 190529536 reserved 190480384
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): trans_block_rsv: size 0 reserved 0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): chunk_block_rsv: size 0 reserved 0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): remap_block_rsv: size 0 reserved 0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): delayed_block_rsv: size 0 reserved 0
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state A): delayed_refs_rsv: size 1270611968 reserved 368197632
juin 09 02:35:02 hermes kernel: BTRFS: error (device sda3 state A) in btrfs_run_delayed_refs:2247: errno=-28 No space left
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state EA): forced readonly
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state EA): 1 enospc errors during balance
juin 09 02:35:02 hermes kernel: BTRFS info (device sda3 state EA): balance: ended with status: -30




Linux (none) 7.0.10+deb14-amd64 #1 SMP PREEMPT_DYNAMIC Debian 7.0.10-1 (2026-05-27) x86_64 GNU/Linux


btrfs-progs v7.0
-EXPERIMENTAL -INJECT -STATIC +LZO +ZSTD +UDEV +FSVERITY +ZONED CRYPTO=builtin


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=ROOT 	/               btrfs   defaults,ssd,compress=zstd,noatime,space_cache=v2		0       1
UUID=9C79-15CA  /boot/efi       vfat    umask=0077					0       1
LABEL=HDDHOME 	/home           btrfs   defaults,compress=zstd,noatime,space_cache=v2			0       2
#LABEL=SSDHOME 	/ssdhome        btrfs   defaults,ssd,compress=zstd,noatime,space_cache=v2	        0       2
LABEL=SSDHOME 	/var            btrfs   defaults,ssd,compress=zstd,noatime,space_cache=v2,subvol=@var	0       2
UUID=EAB2-8BE4  /boot/efi-old       vfat    umask=0077					0       1

btrfs fi usage /var/@var/
Overall:
	Device size:		  68.47GiB
	Device allocated:		  68.47GiB
	Device unallocated:		   1.00MiB
	Device missing:		     0.00B
	Device slack:		     0.00B
	Used:			  51.21GiB
	Free (estimated):		  16.23GiB	(min: 16.23GiB)
	Free (statfs, df):		  16.23GiB
	Data ratio:			      1.00
	Metadata ratio:		      1.00
	Global reserve:		  95.19MiB	(used: 0.00B)
	Multiple profiles:		        no

Data,single: Size:65.44GiB, Used:49.21GiB (75.20%)
    /dev/sda3	  65.44GiB

Metadata,single: Size:3.00GiB, Used:2.00GiB (66.51%)
    /dev/sda3	   3.00GiB

System,single: Size:32.00MiB, Used:16.00KiB (0.05%)
    /dev/sda3	  32.00MiB

Unallocated:
    /dev/sda3	   1.00MiB

btrfs balance status /var/@var/
Balance on '/var/@var/' is paused
0 out of about 0 chunks balanced (0 considered), -nan% left


btrfs balance cancel /var/@var/
ERROR: balance cancel on '/var/@var/' failed: Read-only file system



Thank you for your help,

Alban




             reply	other threads:[~2026-06-09  4:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09  4:42 Alban Browaeys [this message]
2026-06-09 12:17 ` Btrfs ENOSPC / Stuck in RO with "exclusive operation balance paused in progress" Alban Browaeys
2026-06-09 15:25   ` Chris Murphy
2026-06-10 21:05     ` Alban Browaeys
2026-06-11 21:19       ` Alban Browaeys
2026-06-15  0:25         ` Alban Browaeys
2026-06-15  2:07           ` Chris Murphy
2026-06-15 11:06             ` Alban Browaeys
2026-06-15 20:00               ` Chris Murphy
2026-06-19  0:05                 ` Alban Browaeys

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=068e841a-37fd-4fe5-ba2d-0ab93c55830d@gmail.com \
    --to=alban.browaeys@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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