On Thu, 2015-12-10 at 19:32 -0700, Chris Murphy wrote:
> That seems due for a revision because I do rw, ro, rw, rw, ro mounts
> in sequence and they stick fine. In fact they stick with the same
> subvolume.
> 
> [root@f23m ]# mount /dev/sda7 /mnt/1 -o subvol=home
> [root@f23m ]# mount /dev/sda7 /mnt/2 -o subvol=home,ro
> [root@f23m ]# mount /dev/sda7 /mnt/3 -o subvol=home
> [root@f23m ]# mount
> [...snip...]
> /dev/sda7 on /mnt/1 type btrfs
> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)
> /dev/sda7 on /mnt/2 type btrfs
> (ro,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)
> /dev/sda7 on /mnt/3 type btrfs
> (rw,relatime,seclabel,ssd,space_cache,subvolid=258,subvol=/home)


Not sure what you mean with "stick" here... I'd say the above has
simply the following semantics:
- the default for mounts is rw
- thus /mnt/1 and /mnt/3 are rw, and 3 isn't rw, because 1 was

In other words, if you change that to the following:
# mount /dev/sda7 /mnt/1 -o subvol=home,ro
# mount /dev/sda7 /mnt/2 -o subvol=home,ro
# mount /dev/sda7 /mnt/3 -o subvol=home
I'd expect that you get
ro
ro
rw

At least based on how I understood the whole system now.
That was actually my question here:
Q: In other words does mounting the same subvol *again* behave like --
bind mounts, i.e. the further mounts would get the options from the
first mount?

And I guess the A:(nswer) is: no, mount options affect the respective
mountpoint (including any nested subvols below that) only (except of
course it's a --bind mount.


If one of the devs could confirm that semantics, I may find some time
to update the wiki accordingly.


Cheers,
Chris.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to