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

Re: LVM/btrfs - Was: Re: firefox-37, where to put



On Fri, 3 Apr 2015 17:05:43 +0300
Reco <recoverym4n@gmail.com> wrote:
>  Hi.
> 
> On Fri, Apr 03, 2015 at 03:40:58PM +0200, Petter Adsen wrote:
> > This ties in nicely with something I'm sitting here and wondering
> > about right now. I'm preparing to upgrade my home server to Jessie
> > today, and at the same time I want to set up something like LVM on
> > the system disk (2x250G in mdadm RAID1). The main reason is that I
> > want snapshots, and a secondary, nice-to-have-but-not-essential
> > reason is future resizing of volumes.
> 
> Both are possible with LVM. Snapshots require preliminary space
> reservation for keeping the difference between a main filesystem and a
> snapshot, and I/O may suffer somewhat, but that's it.

OK, good. Performance is no big deal in this case, the machine is just
used as a file server. I intended to set aside a good chunk of space
for possible future expansion of filesystems anyways, so there should
be plenty available for snapshots.

> Resizing just works, as long as you don't forget the correct order for
> changing the filesystem and the volume. I.e.
> 
> 1) Enlarge - volume first, filesystem last.
> 2) Reduce - filesystem first, volume last.

I expect the combination of ext4 and LVM is so common that ext4 would
be a good choice of filesystem if I ever get the need to resize?

> > The alternative to LVM would be btrfs, which would give me RAID1 and
> > snapshots, plus subvolumes. I am familiar with mdadm, but I am *not*
> > familiar with LVM or btrfs in any way.
> 
> I'd stay clear of brtfs if I were you until jessie+1 (I forget
> whatever its called) enters freeze. Then you install backported
> kernel and *maybe* btrfs would be so kind and would not eat your data.

That was what I was afraid of.

<snip>

> > What would the experts here recommend? I've been searching for a
> > while now, but I haven't found anything recent that applies to both
> > LVM and btrfs. I know btrfs is a moving target, is it stable enough
> > to use for both it's RAID functionality and the rest? Or would I be
> > better off with mdadm and LVM? Which is better to work with?
> 
> You have mdadm. Add LVM on top of it. Make sure you have an non-LVM
> EFI partition in case of using UEFI (does not apply to BIOS). Don't
> forget to add busybox into initrd just in case. Enjoy.

No EFI, just BIOS. Old machine. :) From what I understand, is it
recommended to create a separate /boot that is not on LVM, or is that
no longer the case?

> If you really want to try btrfs - stay clear of both mdadm and LVM.
> btrfs has own filesystem-aware LVM, and stacking LVMs never was a good
> idea.

No, I have no big desire to test it, I was just wondering if it would
be a less complex solution to have both RAID and LVM-like functionality
from btrfs than running both mdadm and LVM will introduce.

But I think I will stick with mdadm + LVM. Thanks for your advice!

Petter

-- 
"I'm ionized"
"Are you sure?"
"I'm positive."

Attachment: pgpavsphQKkQM.pgp
Description: OpenPGP digital signature


Reply to: