linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo@cn.fujitsu.com>
To: Sebastian Ochmann <ochmann@informatik.uni-bonn.de>,
	Chris Murphy <lists@colorremedies.com>,
	<zhe.zhang.research@gmail.com>
Cc: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: Is it safe to mount subvolumes of already-mounted volumes (even with different options)?
Date: Thu, 17 Jul 2014 16:48:30 +0800	[thread overview]
Message-ID: <53C78DDE.6040009@cn.fujitsu.com> (raw)
In-Reply-To: <53C78212.2070204@informatik.uni-bonn.de>


-------- Original Message --------
Subject: Re: Is it safe to mount subvolumes of already-mounted volumes 
(even with different options)?
From: Sebastian Ochmann <ochmann@informatik.uni-bonn.de>
To: Chris Murphy <lists@colorremedies.com>, zhe.zhang.research@gmail.com
Date: 2014年07月17日 15:58
> Hello,
>
> I need to clarify, I'm _not_ sharing a drive between multiple 
> computers at the _same_ time. It's a portable device which I use at 
> different locations with different computers. I just wanted to give a 
> rationale for mounting the whole drive to some mountpoint and then 
> also part of that drive (a subvolume) to the respective computer's 
> /home mountpoint. So it's controlled by the same kernel in the same 
> computer, it's just that part of the filesystem is mounted at multiple 
> mountpoints, much like a bind-mount, but I'm interested in mounting a 
> subvolume of the already-mounted volume to some other mountpoint. 
> Sorry for the confusion.
>
> Best regards
> Sebastian
If you mean something like the following use case:
# mount /dev/sdb1 -o subvolid=257 /home
# mount /dev/sdb1 -o subvolid=5 /some/other/place

That is completly OK.

But when it comes to different mount option, especially different ro/rw 
mount option,
although it is working for 3.16-rc*, the ro/rw mount option is still 
under disscussion and the current rc implement
will cause a kernel warning mounting a subvolume rw when it's first 
mounted as ro.

So in short:
1) mount subvolumes when the btrfs fs is already mounted.
Completly OK.

2) different mount option for different subvolume in one btrfs fs.
For most mount option including ro/rw, No.

Thanks,
Qu
>
>
> On 17.07.2014 01:18, Chris Murphy wrote:
>>
>> On Jul 16, 2014, at 4:18 PM, Sebastian Ochmann 
>> <ochmann@informatik.uni-bonn.de> wrote:
>>
>>> Hello,
>>>
>>> I'm sharing a btrfs-formatted drive between multiple computers and 
>>> each of the machines has a separate home directory on that drive.
>>
>> 2+ computers writing to the same block device? I don't see how this 
>> is safe. Seems possibly a bug that the 1st mount event isn't setting 
>> some metadata so that another kernel instance knows not to allow 
>> another mount.
>>
>>
>> Chris Murphy
>>
> -- 
> 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


  reply	other threads:[~2014-07-17  8:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 22:18 Is it safe to mount subvolumes of already-mounted volumes (even with different options)? Sebastian Ochmann
2014-07-16 23:18 ` Chris Murphy
2014-07-17  7:58   ` Sebastian Ochmann
2014-07-17  8:48     ` Qu Wenruo [this message]
2014-07-17  3:27 ` Zhe Zhang
2014-07-17  8:41 ` Hugo Mills
2014-07-17 15:45   ` Duncan

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=53C78DDE.6040009@cn.fujitsu.com \
    --to=quwenruo@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=ochmann@informatik.uni-bonn.de \
    --cc=zhe.zhang.research@gmail.com \
    /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).