digint / btrbk

Tool for creating snapshots and remote backups of btrfs subvolumes
https://digint.ch/btrbk/
GNU General Public License v3.0
1.64k stars 120 forks source link

Almost no space left and couldn't delete the broken sub volume. #458

Closed msmafra closed 2 years ago

msmafra commented 2 years ago

Hello there!

I followed a guide to set up BTRBK, and it was working very well until my system started having problems because of not enough free space left. The configuration file I used:

`transaction_log /var/log/btrbk.log lockfile /var/lock/btrbk.lock timestamp_format long

snapshot_dir _btrbk_snap snapshot_preserve_min 3h snapshot_preserve 6h 5d 3w 1m target_preserve_min 3h target_preserve 24h 31d 52w

volume /btrfs_pool snapshot_create always target send-receive /btrfs_backup subvolume root subvolume home`

My system is installed in a 500GB SSD and the external backup is sent to a USB 1TB drive.

I was able to restore from the specific snapshot I wanted, but not able to remove the "broken" sub volume. Kept saying (probably a BTRFS thing) that the sub volume wasn't empty.

digint commented 2 years ago

This is definitively a btrfs thing. A known problem with btrfs is that in order to delete something, you need free space (for the metadata change). This was a big problem in the past, these days btrfs reserves some space on the drive for exactly this use case.

The trick is to never get out of disk space...

Can't help you much further here, if you still have the problem (sorry for replying so late, I'm very busy these days...) you might want to ask on the btrfs mailing list or irc.

Closing this ticket, feel free to re-open it if you think this is a btrbk problem.

msmafra commented 2 years ago

Hello there. I managed to solve it. I am using BTRK since then with no more out of space problems. Actually, it was I that assumed that BTRBK would deal with it or alert me in some way. I had this problem with BTRFS a few times before, in the past with BTRFS on everyday use, including when testing TimeShift. Just the not being able to remove the "broken" snapshot happen again the two times I tested F36 Beta, when restoring to F35.