All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: Zhe Zhang <zhe.zhang.research@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: [Question] Btrfs on iSCSI device
Date: Fri, 27 Jun 2014 18:34:34 +0200	[thread overview]
Message-ID: <53AD9D1A.4050703@libero.it> (raw)
In-Reply-To: <CAMXuLLrhMv82LPveRemDU_v_Kru2US6sKVn377gS3t9p-VFrag@mail.gmail.com>

Hi,
On 06/27/2014 05:44 PM, Zhe Zhang wrote:
> Hi,
> 
> I setup 2 Linux servers to share the same device through iSCSI. Then I
> created a btrfs on the device. Then I saw the problem that the 2 Linux
> servers do not see a consistent file system image.
> 
> Details:
> -- Server 1 running kernel 2.6.32, server 2 running 3.2.1
> -- Both running btrfs v0.20-rc1
> -- Server 2 has device /dev/vdc, exposed as iSCSI target
>  -- Server 1 mounts the device as /dev/sda
> -- Server 1 'mount /dev/sda /mnt/btrfs'; server 2 'mount /dev/vdc /mnt/btrfs',
>  -- When server 1 'touch /mnt/btrfs/foo', server 2 doesn't see any
> file under /mnt/btrfs
> -- I created /mnt/btrfs/foo on server 2 as well; then I added some
> content from both server 1 and server 2 to /mnt/btrfs/foo
> -- After that each server sees the content it adds, but not the
> content from the other server
> -- Both server 'umount /mnt/btrfs', and mount it again
> -- Then both servers see /mnt/btrfs/foo with the content added from
> server 2 (I guess it's because server 2 created the foo file later
> than server 1).
> 
> I did a similar test on ext4 and both servers see a consistent image
> of the file system. When server 1 creates a foo file server 2
> immediately sees it.
> 
> Is this how btrfs is supposed to work?

I don't think that it is possible to mount the _same device_ at the _same time_ on two different machines. And this doesn't depend by the filesystem.

The fact that you see it working, I suspect that is is casual.

When I tried this (same scsi HD connected to two machines), I had to ensure that the two machines never accessed to the HD at the same time.

> 
> Thanks,
> 
> Zhe
> --
> 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
> 


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it>
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5

  reply	other threads:[~2014-06-27 16:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 15:44 [Question] Btrfs on iSCSI device Zhe Zhang
2014-06-27 16:34 ` Goffredo Baroncelli [this message]
2014-06-27 17:15   ` Austin S Hemmelgarn
2014-06-27 17:52     ` Zhe Zhang
2014-06-27 23:40   ` Russell Coker
2014-06-28  3:28     ` Austin S Hemmelgarn
2014-06-27 17:54 ` ronnie sahlberg

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=53AD9D1A.4050703@libero.it \
    --to=kreijack@libero.it \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.