All of lore.kernel.org
 help / color / mirror / Atom feed
From: Calvin Walton <calvin.walton@kepstin.ca>
To: "Fajar A. Nugraha" <list@fajar.net>
Cc: Daniel Pocock <daniel@pocock.com.au>, linux-btrfs@vger.kernel.org
Subject: Re: raw partition or LV for btrfs?
Date: Tue, 14 Aug 2012 07:23:48 -0400	[thread overview]
Message-ID: <1344943428.20922.14.camel@ayu> (raw)
In-Reply-To: <CAG1y0scy=6NByQ9DBF_9m6MrmNrYe1WvX9-JkmbEUKWjd77w8Q@mail.gmail.com>

On Mon, 2012-08-13 at 05:48 +0700, Fajar A. Nugraha wrote:
> On Sun, Aug 12, 2012 at 11:46 PM, Daniel Pocock <daniel@pocock.com.au> wrote:

> > d) what about booting from a btrfs system?  Is it recommended to follow
> > the ages-old practice of keeping a real partition of 128-500MB,
> > formatting it as btrfs, even if all other data is in subvolumes as per (b)?
> 
> You can have one single partition only and boot directly from that.
> However btrfs has the same problems as zfs in this regard:
> - grub can read both, but can't write to either. In other words, no
> support for grubenv
> - the "best" compression method (gzip for zfs, lzo for btrfs) is not
> supported by grub

This is actually not true; the grub 2.00 release does support reading
from lzo-compressed btrfs filesystems. (Of course, if any other new
compression algorithms are added, this issue will happen again.)

> For the first problem, an easy workaroud is just to disable the grub
> configuration that uses grubenv. Easy enough, and no major
> functionality loss.
> 
> The second one is harder for btrfs. zfs allows you to have separate
> dataset (i.e. subvolume, in btfs terms) with different compression, so
> you can have a dedicated dataset for /boot with different compression
> setting from the rest of the dataset. With btrfs you're currently
> stuck with using the same compression setting for everything, so if
> you love lzo this might be a major setback.

It's possible to disable compression on individual files on btrfs. If
you disable compression on everything in /boot/grub{2,} and on your
kernels and initramfses then grub will be able to read them no matter
what.

Unfortunately, this is a bit tricky to do at the moment: you have to
remount the filesystem with `-o compress=no`, then run `btrfs fi defrag`
individually on all the files that you want uncompressed.

A patch to add support for `btrfs fi defrag -c none <file>` or so would
make this easier, and shouldn't be to hard to do :)

> Due to second and third problem, I'd recommend you just use a separate
> partition with ext2/4 for now.

Even with my comments, this is still my recommendation. (Although if
you're using a EFI bios, you could just stick all the bootloader stuff
on the VFAT EFI system partition instead.)

-- 
Calvin Walton <calvin.walton@kepstin.ca>


  parent reply	other threads:[~2012-08-14 11:23 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 [this message]
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   ` raw partition or LV for btrfs? Daniel Pocock
2012-08-14 13:52     ` 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=1344943428.20922.14.camel@ayu \
    --to=calvin.walton@kepstin.ca \
    --cc=daniel@pocock.com.au \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list@fajar.net \
    /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.