There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

[help] I can't remove some BTRFS subvolumes + bonus questions

Hello! My disk space was out of space left, so I decided to remove some snapper snapshot. snapper list listed over 360 snapshots. I removed them, and freed 50Gb of space. One of these hasn’t been deleted successfully:


<span style="color:#323232;">Cannot delete snapshot 166 since it is the next to be mounted snapshot.
</span>

it’s description is writable copy of #156. How can I remove it? should I do it using btrfs subvolume delete?

here’s the output of sudo btrfs subvolume list -t /:


<span style="color:#323232;">ID      gen     top level       path
</span><span style="color:#323232;">--      ---     ---------       ----
</span><span style="color:#323232;">256     178487  5               timeshift-btrfs/snapshots/2023-09-18_18-25-33/@
</span><span style="color:#323232;">257     341688  5               @home
</span><span style="color:#323232;">258     341680  5               @cache
</span><span style="color:#323232;">259     341688  5               @log
</span><span style="color:#323232;">260     26      256             timeshift-btrfs/snapshots/2023-09-18_18-25-33/@/var/lib/portables
</span><span style="color:#323232;">261     27      256             timeshift-btrfs/snapshots/2023-09-18_18-25-33/@/var/lib/machines
</span><span style="color:#323232;">708     341688  5               @
</span><span style="color:#323232;">710     341680  708             .snapshots
</span><span style="color:#323232;">2781    178991  5               timeshift-btrfs/snapshots/2024-05-07_12-20-43/@
</span><span style="color:#323232;">2968    326034  710             .snapshots/166/snapshot
</span><span style="color:#323232;">2969    341679  710             .snapshots/167/snapshot
</span>

all those timeshift subvolumes are there because before snapper, I used to use timeshift. I tried to remove them:


<span style="color:#323232;">sudo btrfs subvolume delete timeshift-btrfs/snapshots/2023-09-18_18-25-33/@/var/lib/machines    
</span><span style="color:#323232;">ERROR: Could not statfs: No such file or directory
</span>

If I understand correctly, it means that I should give an actual “system” path instead of the path in the table, but I don’t understand which path

thanks in advance to everyone!

mrvictory1 ,

sudo mount -o subvolid=5 /dev/<your disk here> /mntThis will give you full access to the filesystem, then you can identify the full path of snapshots and delete them ie. sudo btrfs subvolume delete /mnt/…In openSUSE, snapper works by booting to a snapshot. “mount” command will reveal which subvolume you are booted from.

tubbadu OP ,

Thanks for the answer! I mounted it and removed all the timeshift-btrfs stuff. now, after a reboot, sudo btrfs subvolume list -t / does not show timeshift stuffs anymore, but if I mount again sudo mount -o subvolid=5 /dev/nvme0n1p2 /mnt and ls /mnt/ I get:


<span style="color:#323232;">@  @cache  @home  @log  timeshift-btrfs
</span>

how can I remove timeshift-btrfs from there? can i just rm -rf it?

In openSUSE

(sorry I forgot to mention, I’m running EndeavourOS)

mrvictory1 ,

Make sure it doesn’t have anything valuable. Use rm -rf

tubbadu OP , (edited )

It worked, thank you very much for your help man! Now the only remaining problem is the snapshot 166, that snapper does not let me remove. I assume I should remove in a similar way as timeshift:


<span style="color:#323232;">$ sudo btrfs subvolume delete /.snapshots/166/snapshot
</span><span style="color:#323232;">WARNING: not deleting default subvolume id 2968 '/.snapshots/166/snapshot'
</span>

I think there’s something I’m missing about how these snapshot works

mrvictory1 ,

The snapshot may be mounted to root. In the output of “mount” command, if there isn’t a subvolid= or subvol= parameter for root mount, snapshot 166 is currently mounted to root.

just_another_person ,

I would run a check, then balance, then see if it’s still throwing errors. It sounds like something has caught, but if there’s an errant snapshot I wouldn’t worry about it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines