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
a) What happend
b) What to do to repair
c) What to do, to not get out of space again
btrfs is able to list all snapshots/subvolumes
Either use timeshift or use snapper. Don“t use them at the same time together
Defrag with btrfs is no solution for āno space leftā. It will only get worse !
There is a simple solution (in the wiki)
care to share in this thread without linking to a page
Itās actually a very informative page on btrfs - better than most I have seen.
Oh for sure! i have imidiatly bookmarked it
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???
Ok my brains just crashed nowā¦
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:
ok understood
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.
And it is possible to have 500GB Data on a btrfs-partition with 400GB, and even have 150GB unallocated (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
thanks to everybody for helping me today!
take care
Look the similar issue:
You can exclude some data from home snapshot:
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.