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?

  • Jozzo@lemmy.worldOP
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    13 hours ago

    Interesting, this could be it? I haven’t configured any mounts on this device yet, but when I tried one of the other suggestions from this thread and use btdu, I get this error:

    $ ./btdu -x /
    Fatal error: The mount point you specified, "/", is not the top-level btrfs subvolume ("subvolid=5,subvol=/").
    It is the btrfs subvolume "subvolid=256,subvol=/@rootfs".
    Please specify the path to a mountpoint mounted with subvol=/ or subvolid=5.
    E.g.: mkdir /mnt/sda1 && mount -o subvol=/ /dev/sda1 /mnt/sda1 && ./btdu /mnt/sda1
    
    Note that the top-level btrfs subvolume ("subvolid=5,subvol=/") is not the same as the root of the filesystem ("/").
    

    I’m fairly new to the workings of Btrfs so this is jibberish to me right now, but I’ll look into it more

    EDIT: Nevermind! I was just using the tool wrong. I needed to mount my btrfs “sub-volume” then do the scan against that:

    sudo mkdir -p /mnt/btdu

    sudo mount -o subvolid=5 /dev/sda1 /mnt/btdu

    sudo ./btdu /mnt/btdu