Re: raw partition or LV for btrfs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 12/08/12 22:48, Fajar A. Nugraha wrote:
> On Sun, Aug 12, 2012 at 11:46 PM, Daniel Pocock <daniel@xxxxxxxxxxxxx> 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.


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux