According to the btrfs Readonly snapshots patch it’s possible to “set a snapshot readonly/writable on the fly.” So I should be able to turn my readonly snapshot (created with
btrfs snapshot -r) writable, somehow.
But neither the btrfs subvolume manpage nor any other part of that manpage seems to give a way to do that.
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
The btrfs manpage fails to document the
property subcommand, which I found by grep’ing the source. It’s also in
To set a snapshot to read-write, you do something like this:
btrfs property set -ts /path/to/snapshot ro false
Change that to
trueto set it to read-only.
You can also use
list to see the available properties:
btrfs property list -ts /path/to/snapshot ro Set/get read-only flag of subvolume.
-tspecifies the type of object to work on,
smeans subvolume. Other options are
d(device). If you don’t specify, it’ll show all applicable ones (for list) or try to guess for get/set.
Edit: in the newest btrfs tools, there is a
btrfs-property manpage documenting that subcommand, although it’s not mentioned in the main manpage at all. It’s also available as the btrfs-property page on the wiki.
(Note: This requires a new-enough btrfs-tools. Apparently on Debian Wheezy, you’ll have to install the updated one from wheezy-backports; thanks artfulrobot).