Skip to contentSkip to conversation

high space usage after ext3 btrfs-convert

DISCUSSION koraynilay 1 participant 2 messages Oct 14, 2025 – Oct 18, 2025 Btrfs file system

lore
Share & tools
lore

koraynilay

author
#0 lore raw

Hello, I btrfs-convert'd a 475 GiB ext3 partition which had a few GiBs free, after the conversion I removed the /ext2_saved subvolume and balanced the fs but the free space went to 0 B (statfs, df) and 1.61 GiB (estimated) and the df value would randomly jump from 0 B to 1.61 GiB for a few seconds. Here whenever I tried to do any more balancing it would just fail with ENOSPC.

So I made a 488 GiB partition on another HDD and added it to the fs so that I had 488 GiB free, but when I deleted ~215 GiB, the free space wouldn't change. I tried to balance a few times with different percentages but the free space would always stay at around 486-488 GiB.

So I did a defrag of the whole filesystem (using the command in the btrfs-convert man page), which made the free space go down to ~200 GiB and after deduplicating using bees (until it finished) (there is a lot of duplicate stuff) the free space settled on ~370 GiB. Now the used space (according to btrfs filesystem usage) is ~600 GiB and btdu reports there are ~282 GiB of <UNREACHABLE> space which should've been fixed by the defrag (according to what I found online).

A normal ncdu scan says there are 380 GiB used (402 GiB apparent).

Is there anything else I can try to fix it or should I just save the new files, restore the ext3 backup and redo it?

Thanks in advance.

author
#1 lore raw

Update on this issue:

Quoted 1 line

which should've been fixed by the defrag

After asking on #btrfs on irc I found the solution, which was actually to use defrag, but with -t 4G and forcing compression/no compression by using -czstd/--nocomp.
By running a defrag on the full fs and on some folders/files that still appeared as <UNREACHABLE>, I was able to get the <UNREACHABLE> space to ~4 GiB (and hopefully it will go to 0 after defragging those remaining folders/files).

Thanks to Forza for telling me the solution and for multicore and eyeoh for taking some of their time to help me.

P.S.

Quoted 1 line

that I had 488 GiB free, but when I deleted ~215 GiB, the free space

This was actually ~86 GiB, but irrelevant I think.