this post was submitted on 08 Oct 2025
40 points (95.5% liked)

Linux

59165 readers
293 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

Edit: Solved!

Unfortunately I'm not sure exactly what fixed it, because I was running btrfs commands like a madman. Some combination of the following caused my 100GB labelled as UNREACHABLE to turn into UNUSED, which allowed that space to be written to as normal:

sudo btrfs balance start -v /

sudo btrfs filesystem defrag -v /

sudo btrfs filesystem defrag -v -r /

Also the tool btdu was incredibly helpful!


One of my linux boxes ran out of disk space, which surprised me, because it definitely didn't have that much stuff on it. When I check with df it says I have used 212GB on my / path:

$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       227G  212G  5.2G  98% /

So, I tried to use du to see if maybe a runaway log file was the cause, but this says I have only used 101GB on my / path (this is also more in-line with how much space I expected to be used):

$ du -h | sort -h
...
101G    /

Using those commands with sudo outputs the same sizes.

My filesystem is Btrfs, I've tried the suggestion to use btrfs balance start ... but this actually INCREASED my disk usage to 99% lol

So my question is... what on earth is using the remaining 111GB?? Why can I not see it in du?

you are viewing a single comment's thread
view the rest of the comments
[–] Oinks@lemmy.blahaj.zone 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I'm not a btrfs expert but AFAIK high unreachable space usage is usually a result of fragmentation. You might want to defragment the filesystem and see if that helps.

I will note that btrfs makes estimations of used/available space very difficult by design, and you especially can not trust what standard UNIX tools like df and du tell you about btrfs volumes. Scripting around du or using ncdu will not help here in any way. You might want to read this kernel.org wiki article as well as the man pages for the btrfs tools (btrfs(8) and particularly btrfs-filesystem(8)), which among other things provide versions of df and du that actually work, or at least they do most of the time instead of never.

[–] Jozzo@lemmy.world 1 points 1 week ago

Looks like some combination of defragging & balancing has done the trick! The space that was previously marked UNREACHABLE is now UNUSED, and my disk space is back to normal:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       227G  105G  103G  51% /

Thanks for the wiki link, Btrfs is new to me and I've definitely got some learning to do