Deleting BTRFS snapshots in TImeshift MURDERS free space

More often than not if I delete a couple of old snapshots in Timeshift I start losing free space like mad. For example a while ago I deleted 30 snapshots and the free space indicator went from 70G to 27G. Today I deleted 3 snapshots, it went from 59G to 44G.

Balancing works to get back some space, but it’s far from how much space I should be having. (though unless I run “btrfs balance start -m /” 2-3 times in a row it doesn’t do much)

I tried “btrfs balance start -dusage=5 /” it did not do anything, I also tried balancing in btrfs-assistant, but my free space indicator went down from 40G to 1.7G at the time.

What could be causing this? How normal is this behavior?

(Balancing frequently is clearly not great for ssd wear & this only started happening very recently, had not had problems before. What is going on?)

I should have close to 75gigs free, I don’t feel like having overbought space.

Just be clear, which indicator are you looking at to check your free space?

Just be clear, which indicator are you looking at to check your free space?

What timeshift, thunar & even btrfs-assistant says.

I would expect free space to be close to total space minus used space. (I don’t have any snapshots older than today, nor do I have bugged snapshots that Timeshift failed to delete, not as far as I can see at any rate)

Can you share the output of sudo btrfs fi usage -b /

    Device size:		      154593656832
    Device allocated:		       95566168064
    Device unallocated:		       59027488768
    Device missing:		                 0
    Device slack:		                 0
    Used:			       74864488448
    Free (estimated):		       63778820096	(min: 34265075712)
    Free (statfs, df):		       63777771520
    Data ratio:			              1.00
    Metadata ratio:		              2.00
    Global reserve:		         203980800	(used: 0)
    Multiple profiles:		                no

Data,single: Size:76171706368, Used:71420375040 (93.76%)
   /dev/sda1	76171706368

Metadata,DUP: Size:9663676416, Used:1722040320 (17.82%)
   /dev/sda1	19327352832

System,DUP: Size:33554432, Used:16384 (0.05%)
   /dev/sda1	  67108864

   /dev/sda1	59027488768
````Preformatted text`

You have 9GB in metadata. That may not show up as part of used.

Also, you should read this:

That explains your current space. However, I am not sure why deleting snapshots would cause a permanent decrease in free space.

No free space will be left untouched!!!

That looks like you are using Kernel 6.7 to increase the metadata size when balancing.

This is a known issue.

Kernel 6.6 LTS is not affected by this issue.

Thanks a lot for this comment, this is giving me a peace of mind.

Mayhaps I will boot into the LTS kernel to delete snapshots from now on. In fact I have 30 or so that I need to delete right now, but I’ve been procrastinating, knowing that I would need to run balancing 2-3 times afterwards…

edit: This worked. I deleted the snapshots on the LTS kernel & regained the lost space. :slight_smile:

(they broke so many things in the 6.7 kernel, omg)

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