BTRFS: Read only filesystem while mounted read write
Saturday, October 1 2022 · Lesezeit: 1 Minuten · 192 WörterWhile doing my monthly backups I got a little bit confused. I found an old backup of an LXC container which was not needed anymore. But I was not able to delete it:
rm: cannot remove ‘container_backups/XXX/rootfs/var/log/private’: Read-only file system
Checking with mount
the backup filesystem was mounted rw
and dmesg also did not indicate a btrfs problem. Missing privileges were also not an issue as I was logged in as root. But then I remembered that I was experimenting with btrfs subvolumes and used the send/receive function for backups. And there you need in some cases set a ro
label on the subvolume. My guess was that this label was still be present.
btrfs property get container_backups/XXX/rootfs/
ro=true
Indeed it was still set. Simply setting it to ro = false is apparently not a good solution:
btrfs property set container_backups/XXX/rootfs/ ro false
ERROR: cannot flip ro->rw with received_uuid set, use force if you really want that
Did I care? No. The data should be deleted anyways. I inserted the -f
switch and dit it anyway.
Conclusion: With current filesystems a rw
mount flag does not always mean that it’s always writeable!
Du hast einen Kommentar, einen Wunsch oder eine Verbesserung? Schreib mir doch eine E-Mail! Die Infos dazu stehen hier.
🖇️ = Link zu anderer Webseite
🔐 = Webseite nutzt HTTPS (verschlüsselter Transportweg) Zurück