btrfs-read-only-subvolume · shipping · also Btrfs subvolume ro property

Btrfs read-only subvolume

A Btrfs read-only subvolume is a subvolume whose ro property prevents modification of its file contents and directory hierarchy.

The flag is the subvolume property ro, read with btrfs property get and changed with btrfs property set, and btrfs subvolume snapshot -r creates a snapshot with it already set. The property belongs to the subvolume, not its access path: a read-only mount does not set it. [1] [2]

Read-only snapshots are the building blocks of incremental send, which derives a stream from the differences between unmodified snapshots. Every snapshot named in one send command must be read-only, the flag cannot change while a send uses the snapshot, and a read-only mount is not accepted in its place because another writable mount of the same subvolume could exist. [2] [4]

A snapshot created by receive is read-only and carries a received_uuid identifying the subvolume that produced the stream. Making it read-write means resetting that identifier, so btrfs property set requires the force option for it. A parent snapshot does not include nested subvolume contents: those locations appear as empty stubs with inode number 2, while a subvolume root always has inode number 256. [2] [1]

Relations

related
Btrfs, Btrfs send stream, Btrfs received UUID, Storage snapshot, Read-only mount, Linux block-device read-only flag, dm-integrity recovery mode

Advantages

  • Because the flag is stored with the subvolume, it applies through every mount of that subvolume, unlike a per-mount read-only option. [4, 2]

Limitations

  • This is not device-wide write protection or an independent backup. [2]
  • The received_uuid safety checks date from version 5.14.2, so subvolumes received earlier may already be read-write while still carrying a valid received_uuid, which can disturb later send and receive. [2]
  • Clearing the flag on a snapshot that serves as an incremental parent allows changes that can lead to unexpected content in later incremental streams. [2]

Citations

  1. Btrfs documentation: subvolume ro property (accessed 2026-10-23)
  2. Btrfs documentation: subvolume flags and non-recursive snapshots (accessed 2026-10-23)
  3. Btrfs documentation: btrfs-send(8), read-only snapshot requirement (accessed 2026-10-23)

Further reading

  1. Hesela: Btrfs tree logs and read-only scope boundaries (accessed 2026-10-15)
Sources & caveats
  • property is the Btrfs btrfs-property(8) page, read in the subvolume ro property, the -f option and the examples.
  • subvolume is the Btrfs btrfs-subvolume(8) page, read in subvolume flags, nested subvolumes, inode numbers and the snapshot -r option.
  • send is the Btrfs btrfs-send(8) page, read in the requirements for snapshots used by one send command.
  • All three pages are the stable documentation as rendered on the access date, with no file system experiment.

JSON: /data/terms/btrfs-read-only-subvolume.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Btrfs read-only subvolume. Hesela. 2026-10-23. https://hesela.dev/terms/btrfs-read-only-subvolume/