From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: "Sébastien ROHAUT" <sebastien.rohaut@free.fr>,
"Chris Murphy" <lists@colorremedies.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: Re: Can't mount subvolume with ro option
Date: Mon, 30 Jun 2014 10:57:36 +0800 [thread overview]
Message-ID: <53B0D220.3070608@cn.fujitsu.com> (raw)
In-Reply-To: <53B0C93E.8050500@cn.fujitsu.com>
-------- Original Message --------
Subject: Re: Can't mount subvolume with ro option
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Sébastien ROHAUT <sebastien.rohaut@free.fr>, Chris Murphy
<lists@colorremedies.com>
Date: 2014年06月30日 10:19
>
> -------- Original Message --------
> Subject: Re: Can't mount subvolume with ro option
> From: Sébastien ROHAUT <sebastien.rohaut@free.fr>
> To: Chris Murphy <lists@colorremedies.com>
> Date: 2014年06月28日 19:02
>> Le 28/06/2014 00:12, Chris Murphy a écrit :
>>> On Jun 27, 2014, at 4:08 PM, Chris Murphy <lists@colorremedies.com>
>>> wrote:
>>>
>>>> On Jun 27, 2014, at 2:07 PM, Sébastien ROHAUT
>>>> <sebastien.rohaut@free.fr> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> In the wiki, it's said we can mount subvolumes with different
>>>>> mount options. nosuid, nodev, rw and ro are listed, as valid
>>>>> generic mount options.
>>>> This might require 3.15. I don't recall it working with early 3.14
>>>> kernels, but by 3.14.3 I'd moved onto testing 3.15.
>>>
>>> [root@f20v ~]# mount /dev/sda3 /mnt
>>> [root@f20v ~]# btrfs subvol create /mnt/test
>>> Create subvolume '/mnt/test'
>>> [root@f20v ~]# umount /mnt
>>> [root@f20v ~]# mount -o ro,subvol=test /dev/sda3 /mnt
>>> mount: /dev/sda3 is already mounted or /mnt busy
>>> /dev/sda3 is already mounted on /
>>> /dev/sda3 is already mounted on /home
>>> /dev/sda3 is already mounted on /var
>>> /dev/sda3 is already mounted on /boot
>>> [root@f20v ~]# uname -r
>>> 3.14.6-200.fc20.x86_64
>>>
>>>
>>> I don't know if this feature will be backported to stable kernels.
>>> If not, then probably the wiki should say it's a 3.15+ feature.
>>> Chris Murphy
>>>
>>>
>> Thank you for your answer. I'm actually moving to a Fedora Rawhide
>> (3.16 kernel).
>>
>> Sebastien Rohaut
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-btrfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> When testing on 3.15.2-ARCH alone with 3.16-rc2, the problem can also
> be reproduced.
>
> But I can't always reproduce it, sometimes I was able to mount subvol
> with ro,
> somtimes not.
>
> So I think the problem needs to be investigated further.
>
> Thanks,
> Qu
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Finally find the stable method to reproduce the problem on 3.16-rc2,
the point is if we mount subvol,ro first, then you can't mount the hole
device:
# mkfs.btrfs -f /dev/sda6
# mount /dev/sda6 /mnt/btrfs/
# btrfs sub create /mnt/btrfs/subv
Create subvolume '/mnt/btrfs/subv'
# umount /mnt/btrfs
# mount -o subvol=subv,ro /dev/sda6 /mnt/other/
# LANG=C mount /dev/sda6 /mnt/btrfs/
mount: /dev/sda6 is already mounted or /mnt/btrfs busy
/dev/sda6 is already mounted on /mnt/other
Thanks,
Qu
next prev parent reply other threads:[~2014-06-30 2:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 20:07 Can't mount subvolume with ro option Sébastien ROHAUT
2014-06-27 22:08 ` Chris Murphy
2014-06-27 22:12 ` Chris Murphy
2014-06-28 11:02 ` Sébastien ROHAUT
2014-06-30 2:19 ` Qu Wenruo
2014-06-30 2:57 ` Qu Wenruo [this message]
2014-06-30 3:31 ` Chris Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53B0D220.3070608@cn.fujitsu.com \
--to=quwenruo@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=lists@colorremedies.com \
--cc=sebastien.rohaut@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).