Over 250GB available BUT not enough space error

If you have btrfs and are “out of space”:

You can find good Information about Btrfs in the wiki

There you will find:

a) What happend
b) What to do to repair
c) What to do, to not get out of space again

1 Like

btrfs is able to list all snapshots/subvolumes :wink:

Either use timeshift or use snapper. Don´t use them at the same time together :face_with_raised_eyebrow:

Defrag with btrfs is no solution for “no space left”. It will only get worse !

The good news:

There is a simple solution (in the wiki)

care to share in this thread without linking to a page :rofl:

It’s actually a very informative page on btrfs - better than most I have seen.

Oh for sure! i have imidiatly bookmarked it :wink:

If the snapshot take space, you can check them like that:

export UUID=$(findmnt -n -o UUID /)

export MNTPNT=$(mktemp -d -t "btrfs.XXX")

sudo mount -m -U "$UUID" "$MNTPNT"

for x in $(sudo btrfs subvolume list "$MNTPNT" | cut -d' ' -f9); do 
   echo ">>> Subvolume: $x"
   sudo btrfs filesystem du -s "$MNTPNT/$x"
done

sudo umount "$MNTPNT"  

And a one-liner:

export UUID=$(findmnt -n -o UUID /); export MNTPNT=$(mktemp -d -t "btrfs.XXX"); sudo mount -m -U "$UUID" "$MNTPNT"; sleep 3 && for x in $(sudo btrfs subvolume list "$MNTPNT" | cut -d' ' -f9); do echo ">>> Subvolume: $x"; sudo btrfs filesystem du -s "$MNTPNT/$x"; sleep 3; done && sudo umount "$MNTPNT"

UPDATE:
after terminal crashed while performing “sudo du --human-readable /tmp/bare_btrfs_root/timeshift-btrfs | xclip -selection clipboard” I decided to delete all my snapshots (just 4 total) and now free space is increasing somehow!
I am not sure if will be what I expect but at least something is happening here…

Please for the sake of our mental states, drop the mount/umount and change them to systemd-mount/systemd-umount please???

I am sorry, but what?
do you mean to mount my external drive somewhere else?

Whaaat??? :exploding_head:
Ok my brains just crashed now… :v:

No. This is to komplex for an easy …

You have to know why btrfs acts this way to pervent it in the future. This is only doable after reading some stuff. Without reading the wiki or the btrfs-homepage someone may make things worse to a point where he seems to have no way out.

If you understand what happened, you will find your way out by yourself !

I am now at 395 GB free space.
Please do not ask me, how this is possible by just 4 snapshots not including the /home folder…

No, it mounts the toplevel of your btrfs partition and checks the subvolume sizes.

In reply to your question mark emote, see: :wink:


ok understood :wink:

It doesn’t matter how many snapshots you have. A large number does not necessarily need a lot of space.
Rather, it is the age of the snapshots that plays a role (because then there are many files in them that have changed in the meantime)

It is often very helpful to delete first only the oldest snapshot.


Btrfs needs some time to clean up after deleting snapshots. Meanwhile, more and more space is slowly being displayed as free. You can watch this as root with “watch btrfs usage …” in a terminal.
:footprints:


And it is possible to have 500GB Data on a btrfs-partition with 400GB, and even have 150GB unallocated :wink: (when compression is on)

the oldest one was dated nov 17th 22 and I did not make many changes on my system since that
I’d really love to understand this mess but for now I am glad it is solved :man_shrugging:

thanks to everybody for helping me today!
take care :slight_smile:

Look the similar issue:

You can exclude some data from home snapshot:

  • Downloads and ISO
  • VM images
  • Games
  • public data, it exists everywhere in internet.
  • (Home cache)

This may happen, when using timeshift in rsync-mode on btrfs

For those intrigued about the reason:
I think it’s because of the normal operating mode of rsync which does a “create temp file and rename over the old original” which uses new space on the disk, while the btrfs way uses hard-links IIRC…

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.