* Concurrent write access
@ 2015-07-09 21:34 Wolfgang Mader
2015-07-09 22:06 ` Hugo Mills
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Mader @ 2015-07-09 21:34 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 349 bytes --]
Hi,
I have a btrfs raid10 which is connected to a server hosting multiple virtual
machine. Does btrfs support connecting the same subvolumes of the same raid to
multiple virtual machines for concurrent read and write? The situation would
be the same as, say, mounting user homes from the same nfs share on different
machines.
Thanks,
Wolfgang
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Concurrent write access
2015-07-09 21:34 Concurrent write access Wolfgang Mader
@ 2015-07-09 22:06 ` Hugo Mills
2015-07-09 22:13 ` Wolfgang Mader
0 siblings, 1 reply; 4+ messages in thread
From: Hugo Mills @ 2015-07-09 22:06 UTC (permalink / raw)
To: Wolfgang Mader; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1547 bytes --]
On Thu, Jul 09, 2015 at 11:34:40PM +0200, Wolfgang Mader wrote:
> Hi,
> I have a btrfs raid10 which is connected to a server hosting
> multiple virtual machine. Does btrfs support connecting the same
> subvolumes of the same raid to multiple virtual machines for
> concurrent read and write? The situation would be the same as, say,
> mounting user homes from the same nfs share on different machines.
It'll depend on the protocol you use to make the subvolumes visible
within the VMs.
btrfs subvolumes aren't block devices, so that rules out most of
the usual approaches. However, there are two methods I've used which I
can confirm will work well: NFS and 9p.
NFS will work as a root filesystem, and will work with any
host/guest, as long as there's a network connection between the two.
9p is, at least in theory, faster (particularly with virtio), but
won't let you boot with the 9p device as your root FS. You'll need
virtualiser support if you want to run a virtio 9p -- I know qemu/kvm
supports this; I don't know if anything else supports it.
You can probably use Samba/CIFS as well. It'll be slower than the
virtualised 9p, and not be able to host a root filesystem. I haven't
tried this one, because Samba and I get on like a house on fire(*).
Hugo.
(*) Screaming, shouting, people running away, emergency services.
--
Hugo Mills | Alert status mauve ocelot: Slight chance of
hugo@... carfax.org.uk | brimstone. Be prepared to make a nice cup of tea.
http://carfax.org.uk/ |
PGP: E2AB1DE4 |
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Concurrent write access
2015-07-09 22:06 ` Hugo Mills
@ 2015-07-09 22:13 ` Wolfgang Mader
2015-07-17 18:12 ` Calvin Walton
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Mader @ 2015-07-09 22:13 UTC (permalink / raw)
To: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]
On Thursday 09 July 2015 22:06:09 Hugo Mills wrote:
> On Thu, Jul 09, 2015 at 11:34:40PM +0200, Wolfgang Mader wrote:
> > Hi,
> >
> > I have a btrfs raid10 which is connected to a server hosting
> > multiple virtual machine. Does btrfs support connecting the same
> > subvolumes of the same raid to multiple virtual machines for
> > concurrent read and write? The situation would be the same as, say,
> > mounting user homes from the same nfs share on different machines.
>
> It'll depend on the protocol you use to make the subvolumes visible
> within the VMs.
>
> btrfs subvolumes aren't block devices, so that rules out most of
> the usual approaches. However, there are two methods I've used which I
> can confirm will work well: NFS and 9p.
>
> NFS will work as a root filesystem, and will work with any
> host/guest, as long as there's a network connection between the two.
> 9p is, at least in theory, faster (particularly with virtio), but
> won't let you boot with the 9p device as your root FS. You'll need
> virtualiser support if you want to run a virtio 9p -- I know qemu/kvm
> supports this; I don't know if anything else supports it.
Thanks for the overview. It it qmeu/kvm in fact, to this is an option. Right
now, however, I connect the discs as virtual discs and not the file system,
but only to one virtual machine.
Best,
Wolfgang
>
> You can probably use Samba/CIFS as well. It'll be slower than the
> virtualised 9p, and not be able to host a root filesystem. I haven't
> tried this one, because Samba and I get on like a house on fire(*).
>
> Hugo.
>
> (*) Screaming, shouting, people running away, emergency services.
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Concurrent write access
2015-07-09 22:13 ` Wolfgang Mader
@ 2015-07-17 18:12 ` Calvin Walton
0 siblings, 0 replies; 4+ messages in thread
From: Calvin Walton @ 2015-07-17 18:12 UTC (permalink / raw)
To: Wolfgang Mader, linux-btrfs
On Fri, 2015-07-10 at 00:13 +0200, Wolfgang Mader wrote:
> On Thursday 09 July 2015 22:06:09 Hugo Mills wrote:
> > On Thu, Jul 09, 2015 at 11:34:40PM +0200, Wolfgang Mader wrote:
> > > Hi,
> > >
> > > I have a btrfs raid10 which is connected to a server hosting
> > > multiple virtual machine. Does btrfs support connecting the same
> > > subvolumes of the same raid to multiple virtual machines for
> > > concurrent read and write? The situation would be the same as,
> > > say,
> > > mounting user homes from the same nfs share on different
> > > machines.
> >
> > It'll depend on the protocol you use to make the subvolumes
> > visible
> > within the VMs.
> >
>
> Thanks for the overview. It it qmeu/kvm in fact, to this is an
> option. Right
> now, however, I connect the discs as virtual discs and not the file
> system,
> but only to one virtual machine.
btrfs is *not* a cluster filesystem, so one key thing it does not
support is having the same block device being mounted by multiple
computers at the same time (doesn't matter if they're hardware or
virtual machines).
Note that all the subvolumes on a btrfs filesystem share some core data
structures, so mounting different subvolumes is not a way to work
around this limitation.
If you mount the filesystem on the host machine then use a network
protocol (like nfs,samba,9p mentioned earlier), everything will be ok.
If you actually want to mount a filesystem from the same block device
on multiple VMs, you'll have to look into using a specially-designed
cluster filesystem like OCFS or GFS.
--
Calvin Walton <calvin.walton@kepstin.ca>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-07-17 18:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 21:34 Concurrent write access Wolfgang Mader
2015-07-09 22:06 ` Hugo Mills
2015-07-09 22:13 ` Wolfgang Mader
2015-07-17 18:12 ` Calvin Walton
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).