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

Linux

58885 readers
533 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
[–] utopiah@lemmy.ml 23 points 4 days ago* (last edited 4 days ago) (1 children)

I typically investigate with ncdu which gives very useful visualization like :

***
/home/fabien/Prototypes/esphome/.esphome ----------------------------------------------------------------------------------------------------------------
                                     /..
    3.1 GiB [######################] /platformio
  218.1 MiB [#                     ] /build
   28.0 KiB [                      ] /idedata
    8.0 KiB [                      ] /storage

and let's you iterate. Here for example you'd go into platformio and get another view, press d to delete files or directories that aren't needed anymore if it's a stale project e.g. node_modules. Go back, etc.

So yes, warmly recommended, both on desktop and remote servers. It's way easier IMHO that du -sh ./directory then cd, rinse and repeat. It's also way WAY faster then GUI equivalents ... because you navigate and take action, e.g. delete, with your keyboard.

All that being said, if it's about your filesystem rather than your files, it probably won't help much. I don't know enough about btrfs to help unfortunately.

[–] Jozzo@lemmy.world 6 points 4 days ago

ncdu

Oh this one is very cool! Unfortunately it also only shows the same 101GB being used:

ncdu 1.22 ~ Use the arrow keys to navigate, press ? for help                                                                                                                                  
***
/ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   93.1 GiB [###########################] /home                                                                                                                                               
    6.5 GiB [#                          ] /usr
  790.4 MiB [                           ] /var
  173.0 MiB [                           ] /boot
   12.8 MiB [                           ] /etc
    1.7 MiB [                           ] /root
    1.3 MiB [                           ] /run
   44.0 KiB [                           ] /tmp
@   4.0 KiB [                           ]  initrd.img.old
@   4.0 KiB [                           ]  initrd.img
@   4.0 KiB [                           ]  vmlinuz.old
@   4.0 KiB [                           ]  vmlinuz
@   4.0 KiB [                           ]  lib64
@   4.0 KiB [                           ]  sbin
@   4.0 KiB [                           ]  lib
@   4.0 KiB [                           ]  bin
.   0.0   B [                           ] /proc
    0.0   B [                           ] /sys
    0.0   B [                           ] /dev
    0.0   B [                           ] /media
e   0.0   B [                           ] /srv
e   0.0   B [                           ] /opt
e   0.0   B [                           ] /mnt