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@xxxxxxxxxxxxx> 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@xxxxxxxxxx>
--
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