TL;DR: I think my root fs is bloated with old files because I used btrfs straight up instead of conventional subvolume layout. What’s the best way to go about fixing this?
Hello! I’ve been messing about with btrfs for my root, and decided to install gentoo on it before rtfm, since it seemed all shiny and easy to deal with. The subvolume backup system has already saved me countless times.
To make matters worse, I decided I would RAID0 both my nvme drives for space and speed, as I wanted to do vfio gaming. Cringe anticheat has forced me to buy a new ssd for dual-boot, but I need more space now, so I’d like to convert back to single device. I know how to do this.
My fs layout doesn’t follow convention where root
, home
, etc. are subvolumes. Instead, I installed onto the “root” of the btrfs drive itself, and a while later added a .snapshots subvolume and mounted that as system root. I tried converting back to single drive once, but ran out of space and had to revert, even though through all means it should be able to fit on one drive. My guess is that a bunch of old files on the top level 5 path subvolume are taking up space, and I can’t delete it. Is my only option to make a new subvolume or even fresh drive and copy stuff over? My fstab is:
LABEL=rootfs / btrfs defaults,noatime,discard,compress=zstd
/dev/nvme0n1p3 /.snapshots btrfs defaults,noatime,discard,compress=zstd,subvol=.snapshots
btrfs fi du -s /
:
Total Exclusive Set shared Filename
110.52GiB 110.52GiB 2.26MiB /
btrfs fi show /
Total devices 2 FS bytes used 509.77GiB
devid 1 size 465.63GiB used 259.63GiB path /dev/nvme0n1p3
devid 2 size 465.76GiB used 259.63GiB path /dev/nvme1n1
Edit: I only have 2 snapshots, the currently mounted one and the root one, neither of which can be deleted.
ID 715 gen 429417 top level 5 path .snapshots
ID 1117 gen 436955 top level 715 path .snapshots/76/snapshot