linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Pocock <daniel@pocock.com.au>
To: linux-btrfs@vger.kernel.org
Subject: Re: raw partition or LV for btrfs?
Date: Tue, 14 Aug 2012 13:28:59 +0000	[thread overview]
Message-ID: <502A529B.8060201@pocock.com.au> (raw)
In-Reply-To: <CAG1y0scy=6NByQ9DBF_9m6MrmNrYe1WvX9-JkmbEUKWjd77w8Q@mail.gmail.com>



On 12/08/12 22:48, Fajar A. Nugraha wrote:
> On Sun, Aug 12, 2012 at 11:46 PM, Daniel Pocock <daniel@pocock.com.au> wrote:
>>
>>
>> I notice this question on the wiki/faq:
>>
>>
>> https://btrfs.wiki.kernel.org/index.php/UseCases#What_is_best_practice_when_partitioning_a_device_that_holds_one_or_more_btr-filesystems
>>
>> and as it hasn't been answered, can anyone make any comments on the subject
>>
>> Various things come to mind:
>>
>> a) partition the disk, create an LVM partition, and create lots of small
>> LVs, format each as btrfs
>>
>> b) partition the disk, create an LVM partition, and create one big LV,
>> format as btrfs, make subvolumes
>>
>> c) what about using btrfs RAID1?  Does either approach (a) or (b) seem
>> better for someone who wants the RAID1 feature?
> 
> IMHO when the qgroup feature is "stable" (i.e. adopted by distros, or
> at least in stable kernel) then simply creating one big partition (and
> letting btrfs handle RAID1, if you use it) is better. When 3.6 is out,
> perhaps?
> 
> Until then I'd use LVM.
> 

Can you just elaborate on the qgroups feature?
- Does this just mean I can make the subvolume sizes rigid, like LV sizes?
- Or is it per-user restrictions or some other more elaborate solution?

If I create 10 LVs today, with btrfs on each, can I merge them all into
subvolumes on a single btrfs later?

If I just create a 1TB btrfs with subvolumes now, can I upgrade to
qgroups later?  Or would I have to recreate the filesystem?

I really appreciate the answers from people.  Reflecting on some of the
comments and past experience, my feeling is that I should do the following:

a) create the partition table as normal
b) create one big partition as LVM (type 0x8e)
c) create one big LV (for all of the disk)
d) format the LV as btrfs
e) create a subvolume to hold the data from each LV that I have on my
old disk

My reason for doing (b) and (c) is that I may want to have the following
options in future - would these still be possible without LVM at all,
using btrfs on a raw 1TB partition?
- using pvmove to move the filesystem to another physical device (e.g.
if I purchase a 2TB drive to replace the 1TB drive)
- using lvresize to expand the allocation onto such a new drive

If I understand correctly, if I don't use LVM, then such move and resize
operations can't be done for an online filesystem and it has more risk.



  parent reply	other threads:[~2012-08-14 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 16:46 raw partition or LV for btrfs? Daniel Pocock
2012-08-12 22:48 ` Fajar A. Nugraha
2012-08-13  4:19   ` Kyle Gates
2012-08-13  4:49     ` Fajar A. Nugraha
2012-08-14 11:23   ` Calvin Walton
2012-08-22 15:42     ` David Sterba
2012-08-28 11:54       ` raw partition or LV for btrfs? (FAQ updated) Daniel Pocock
2012-08-14 13:28   ` Daniel Pocock [this message]
2012-08-14 13:52     ` raw partition or LV for btrfs? Olivier Bonvalet
2012-08-14 13:53     ` Fajar A. Nugraha
2012-08-14 14:09       ` cwillu
2012-08-14 14:21         ` Fajar A. Nugraha
2012-08-14 14:50           ` cwillu
2012-08-14 14:44         ` Calvin Walton

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=502A529B.8060201@pocock.com.au \
    --to=daniel@pocock.com.au \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).