-------- Original Message --------
Subject: Re: Is it safe to mount subvolumes of already-mounted volumes (even with different options)?
From: Sebastian Ochmann <ochm...@informatik.uni-bonn.de>
To: Chris Murphy <li...@colorremedies.com>, zhe.zhang.resea...@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 <ochm...@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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to