
On 28/08/2019 18:42, Andrei Borzenkov wrote:
28.08.2019 17:30, Matthias Brugger пишет:
Hi,
I'm trying to delete snapshots in /.snapshots from my HDD using the rescue disk. mount shows me the partition mounted as rw but if I try to delete a file by hand it says:
rm: cannot remove '<path-to-file>': Read-only file system
We do not even know what you are trying to delete and where <path-to-file> is located. The most simple answer is that <path-to-file> is on read-only rescue disk.
Besides, I do not understand what "rm" has to do with "removing snapshots". You do not remove btrfs subvolume using "rm". If you are trying to remove files from within read-only snapshot, then it is obviously not possible.
Thing is snapshot 44 occupies 23GB on the disk, but does not show up with 'snapper ls'
I also tried snapper --no-dbus -r /mnt rm 44
I tried mounting the partition in the following ways: mount /dev/sda6 /mnt mount -o subvol=.snapshots /dev/sda6 /mnt mount -o recovery,nospace_cache,clear_cache /dev/sda6 /mnt
But nothing helps. How can I get rid of the snapshots or any other files?
You do not show mount table, you do not show commands you use, you do not show their output, you do not show any kernel messages (if filesystem goes read-only, you should have kernel messages in dmesg) ... do you seriously expect useful replies?
The root cause is, that the btrfs filesystem is broken. You can find some information here: https://bugzilla.suse.com/show_bug.cgi?id=1138548 If you have any idea how to fix this, please let me know. The partition is still around and it would help me to recover all my settings. But that's a different story, which should be discussed in the bug and not on this mail thread. Regards, Matthias
You remove btrfs subvolume using
btrfs subvolume delete /path/to/subvolume
snapshot is just another btrfs subvolume.
To use snapper from rescue environment you at least need to make sure that subvolume with snapshots is mounted on <path-to-root>/.snapshots directory.