You are not logged in.

#1 2021-11-22 11:31:39

avongil
Member
From: Easton, PA
Registered: 2013-10-06
Posts: 24
Website

[SOLVED] Cannot delete BTRFS snapshot in /home/.snapshots

Hi, everyone.   I am having issues deleting old snapshots in my home folder. 
Snapshots are in here:  /home/.snapshots

[alvaro@GNUChunkPad ~]$ su
Password: 
[root@GNUChunkPad alvaro]# cd /
[root@GNUChunkPad /]# rm -R /home/.snapshots/1914

rm: cannot remove '/home/.snapshots/1914/snapshot/.snapshots': Read-only file system

 

I even tried booting off a usb, mounting the sub volume to /mnt, setting to read only to false but same error. 

I tried all sorts of this:

su
btrfs property set /home/.snapshots ro false
mount -o subvolid=350 /dev/sdb3 /mnt/tempb
chmod 777 /mnt/tempb
rm -R /mnt/tempb/{1914..5268}

chmod failed with the same error
rm failed


here is a btrfs subvolume list:

[root@GNUChunkPad /]# btrfs subvolume list / | head
ID 256 gen 752797 top level 5 path __current/root
ID 257 gen 752797 top level 5 path __current/home
ID 261 gen 25 top level 256 path var/lib/portables
ID 262 gen 26 top level 256 path var/lib/machines
ID 266 gen 751839 top level 256 path .snapshots
ID 350 gen 751832 top level 257 path __current/home/.snapshots
ID 3436 gen 751566 top level 350 path __current/home/.snapshots/1914/snapshot
ID 3438 gen 751566 top level 350 path __current/home/.snapshots/1915/snapshot
ID 3439 gen 751566 top level 350 path __current/home/.snapshots/1916/snapshot
ID 3440 gen 751566 top level 350 path __current/home/.snapshots/1917/snapshot
 



What am I doing wrong?

Last edited by avongil (2021-11-22 12:42:36)

Offline

#2 2021-11-22 11:39:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 15,077

Re: [SOLVED] Cannot delete BTRFS snapshot in /home/.snapshots

why are you not using btrfs subvolume delete directly instead of trying to use general/generic file system tools?

Last edited by V1del (2021-11-22 11:44:10)

Offline

#3 2021-11-22 12:40:59

avongil
Member
From: Easton, PA
Registered: 2013-10-06
Posts: 24
Website

Re: [SOLVED] Cannot delete BTRFS snapshot in /home/.snapshots

because I am a fool!!!
Thank you.

worked!

[root@GNUChunkPad /]# btrfs subvolume delete /home/.snapshots/{1915..5268}/snapshot

Then deleted the dirs normally.
worked!

[root@GNUChunkPad .snapshots]# rm -R  {1914..5268}

Offline

Board footer

Powered by FluxBB