public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Mason <chris.mason@oracle.com>
To: Tomasz Chmielewski <mangoo@wpkg.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: LVM vs btrfs as a "volume manager" for SANs
Date: Mon, 6 Jul 2009 14:51:53 -0400	[thread overview]
Message-ID: <20090706185153.GC4092@think> (raw)
In-Reply-To: <4A4CD0B0.2080907@wpkg.org>

On Thu, Jul 02, 2009 at 05:22:24PM +0200, Tomasz Chmielewski wrote:
> Chris Mason wrote:
>> On Fri, 2009-04-24 at 01:34 +0200, Tomasz Chmielewski wrote:
>>> Chris Mason schrieb:
>>>
>>>>> However, with btrfs, I'm not sure about:
>>>>>
>>>>> - what happens if SAN machine crashes while the iSCSI file images 
>>>>> were being written to; with LVM and its block devices, I'm 
>>>>> somehow more confident it wouldn't make more data loss than 
>>>>> necessary
>>>> If iscsi is writing with O_DIRECT|O_SYNC it should work.
>>> What if it doesn't?
>>>
>>
>> Writes would go to the page cache only (not O_DIRECT) and the metadata
>> wouldn't get flushed with each write (not O_SYNC).
>
> What about the "administrative" part of using btrfs as a volume manager?

In this case it depends on exactly how you do it.  If you're just using
files and putting filesystems on those files (not partitioning inside
the image), then you can use truncate to shrink the image and fallocate
(or truncate if you want it sparse) to extend it.

If you want to make partition tables inside the volumes, then you need
to do the truncate/fallocate game and also change the partition table.

-chris

      reply	other threads:[~2009-07-06 18:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 19:20 LVM vs btrfs as a "volume manager" for SANs Tomasz Chmielewski
2009-04-23  0:13 ` Dmitri Nikulin
2009-04-23 18:45 ` Chris Mason
2009-04-23 23:34   ` Tomasz Chmielewski
2009-04-24 12:38     ` Chris Mason
2009-07-02 15:22       ` Tomasz Chmielewski
2009-07-06 18:51         ` Chris Mason [this message]

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=20090706185153.GC4092@think \
    --to=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mangoo@wpkg.org \
    /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