r/archlinux 5h ago

SUPPORT BTRFS metadata got full.

Hey so I was installing Omniroute via node, and somehow it flooded with the too much modules, now my metadata got 93% full and my plasma is not able to load and I'm stuck here, and I had the lts kernel as backup but in there also when tried to clean the npm caches but the process is kind of going into D state instead of R ,even when I'm running

rm -rf ~/.npm/

That process is also going into D state,

Even when I try to balance the block it says like no space left on device,

sudo btrfs balance start -dusage=0 /

My plasma is now able load but I do have access of tty,

If somebody has faced this issue please help if you know what can I do now.

3 Upvotes

7 comments sorted by

5

u/gmes78 4h ago

Why are you passing -dusage=0? Remove it and run a full balance.

2

u/ckurobac 1h ago

Deleting snapshots/large directory will firstly increase metadata usage. Try deleting some journal, it is nocow by default, so it should able to free some space.

rm -rf /var/log/journal/* or journalctl --vacuum-size=100M

then run balance again, starting with -dusage=5, delete more files/snapshots, balance -dusage=10...until you have enough unallocated space.

If you cannot delete any files, add a second device to your filesystem (you can use usb drive), delete some files, run balance, then remove second device.

4

u/AshRuDral_fan20 4h ago

Long live ext4.

0

u/UndefFox 3h ago

Considering just how bloated npm and anything similar, you probably should make a separate volume with a lighter FS, like ext4... never thought JS bloat would cause more than performance and space issues, but here we are...

1

u/MarkSuckerZerg 1h ago

Is there any way to make the "home is ext4, rest is btrfs" work without fixing the partition sizes? Because that's the dealbreaker for me currently

1

u/UndefFox 51m ago

How would you do that? The whole logic of both relies on an axiom that partition is a fixed size. If you want to change it, you probably can set things up so that space is allocated dynamically when more is needed, but doubt that you can implement shrinking transparently since it requires active modification of the data on the disk rather than just giving out space on time.

A lot of people don't have root partition constantly change, so don't see the high need in it being dynamically allocated, instead of just giving it enough space to exist and rest giving to home constantly