Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-11 Thread Adam Borowski
On Sun, Apr 11, 2021 at 12:10:34PM +0500, Roman Mamedov wrote:
> On Sat, 10 Apr 2021 17:06:22 -0600
> Chris Murphy  wrote:
> 
> > Right. The block device (partition containing the Btrfs file system)
> > must be exclusively used by one kernel, host or guest. Dom0 or DomU.
> > Can't be both.
> > 
> > The only exception I'm aware of is virtiofs or virtio-9p, but I
> > haven't messed with that stuff yet.
> 
> If you want an FS that allows a block device to be mounted by multiple 
> machines
> at the same time, there are a few:
> https://en.wikipedia.org/wiki/Clustered_file_system#Shared-disk_file_system

All of those use some kind of lock manager, though.
So in no case you just mount the same device twice.

-- 
⢀⣴⠾⠻⢶⣦⠀ .--[ Makefile ]
⣾⠁⢠⠒⠀⣿⡁ # beware of races
⢿⡄⠘⠷⠚⠋⠀ all: pillage burn
⠈⠳⣄ `


Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-11 Thread Roman Mamedov
On Sat, 10 Apr 2021 17:06:22 -0600
Chris Murphy  wrote:

> Right. The block device (partition containing the Btrfs file system)
> must be exclusively used by one kernel, host or guest. Dom0 or DomU.
> Can't be both.
> 
> The only exception I'm aware of is virtiofs or virtio-9p, but I
> haven't messed with that stuff yet.

If you want an FS that allows a block device to be mounted by multiple machines
at the same time, there are a few:
https://en.wikipedia.org/wiki/Clustered_file_system#Shared-disk_file_system

-- 
With respect,
Roman


Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-10 Thread Andrei Borzenkov
On 11.04.2021 02:06, Chris Murphy wrote:
> Right. The block device (partition containing the Btrfs file system)
> must be exclusively used by one kernel, host or guest. Dom0 or DomU.
> Can't be both.
> 
> The only exception I'm aware of is virtiofs or virtio-9p, but I
> haven't messed with that stuff yet.
> 

There is no exception. Filesystem accessed by virtio-9p is owned by host.


Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-10 Thread Chris Murphy
On Sat, Apr 10, 2021 at 8:49 AM Roman Mamedov  wrote:
>
> On Sat, 10 Apr 2021 13:38:57 +
> Paul Leiber  wrote:
>
> > d) Perhaps the complete BTRFS setup (Xen, VMs, pass through the partition, 
> > Samba share) is flawed?
>
> I kept reading and reading to find where you say you unmounted in on the host,
> and then... :)
>
> > e) Perhaps it is wrong to mount the BTRFS root first in the Dom0 and then 
> > accessing the subvolumes in the DomU?
>
> Absolutely O.o
>
> Subvolumes are very much like directories, not any kind of subpartitions.

Right. The block device (partition containing the Btrfs file system)
must be exclusively used by one kernel, host or guest. Dom0 or DomU.
Can't be both.

The only exception I'm aware of is virtiofs or virtio-9p, but I
haven't messed with that stuff yet.


-- 
Chris Murphy


Re: Parent transid verify failed (and more): BTRFS for data storage in Xen VM setup

2021-04-10 Thread Roman Mamedov
On Sat, 10 Apr 2021 13:38:57 +
Paul Leiber  wrote:

> d) Perhaps the complete BTRFS setup (Xen, VMs, pass through the partition, 
> Samba share) is flawed?

I kept reading and reading to find where you say you unmounted in on the host,
and then... :)

> e) Perhaps it is wrong to mount the BTRFS root first in the Dom0 and then 
> accessing the subvolumes in the DomU?

Absolutely O.o

Subvolumes are very much like directories, not any kind of subpartitions.

Imagine you'd try to use the same ext4 from the host and from a VM guest,
saying "but they both store their data in separate folders!"

-- 
With respect,
Roman