You are not logged in.

#1 2019-05-14 08:25:01

cowile
Member
Registered: 2019-05-01
Posts: 15

Btrfs as a replacement for lvm

For my most recent install, I wanted to learn about some different tools and used multiple logical volumes on an encrypted partition with each logical volume formatted as btrfs. It wasn't KISS, but it was educational. Now that I have learned more about the capabilities of all of these layers, btrfs seems so powerful that I wonder if there is a use case of lvm that it doesn't subsume.

  1. Btrfs subvolumes with quotas can be used for all the same purposes as logical volumes. btrfs has a convenience advantage here because resizing an lvm logical volume means handling the filesystem it contains separately.

  2. Both support RAID.

  3. Both support snapshots.

While /boot still needs a separate physical partition, is there anyone managing everything else as a single btrfs filesystem? What are advantages and disadvantages? The btrfs faq talks about this topic some, but that isn't the same as direct experience.


The Linux motto is "Laugh in the face of danger." Oops, wrong one. "Do it yourself." Yes, that's it. -- Linus Torvalds

Offline

#2 2019-05-14 10:49:07

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 1,808
Website

Re: Btrfs as a replacement for lvm

I don't know if this is still a case but you'd probably need battery backup for your system. I've had cases where a power outage borks btrfs irrecoverably


https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...

Offline

#3 2019-05-14 14:35:43

Omar007
Member
Registered: 2015-04-09
Posts: 368

Re: Btrfs as a replacement for lvm

You're asking a question that'll most likely only result in very opinionated responses. Don't be surprised if this gets TGN'ed.

On the subject, unlike ugjka here, btrfs has been a lot better and stable for me than any other filesystem so far. It has survived several outages and crashes (even crashes on I/O related jobs/tasks such as schedulers) that on ext4 required me to recover data.
I'm using it on a collection of systems and I find it a lot easier to manage backups, transfers and quota's, changing RAID modi, adding or replacing disks, etc than any other solution available. None of the systems are a 'single' btrfs filesystem though.
Each of them has at the very least an SSD with EFI /boot partition and btrfs / partition (on some systems 2*SSD with btrfs in RAID1 and an automated sync of the /boot partition using pacman hooks) and depending on the goal of the system the non-SSD drives are configured (as a separate) btrfs RAID0 or RAID10 (full-disk, no partition table).
In the past I've also used RAID5/6 but I phased those all out as it had the write-hole problem and thus risk for data loss (luckily personally never hit it while I used it) and heavy I/O load and duration for scrubs once the disks got bigger (3*1-2TB and up taking days).

Last edited by Omar007 (2019-05-14 14:42:28)

Offline

#4 2019-05-14 15:14:11

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Btrfs as a replacement for lvm

I use a three drive partitionless RAID1 setup as the only disks in my server and have never had any issues.

Just like Omar007 it's always recovered flawlessly from power loss in situations where I'd have had to fix a different filesystem.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#5 2019-05-14 15:39:34

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: Btrfs as a replacement for lvm

cowile wrote:

While /boot still needs a separate physical partition

Only for UEFI systems.

I was running a non-UEFI system on a partionless drive with btrfs for a while and had no problems.

Offline

#6 2019-05-14 15:48:13

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: Btrfs as a replacement for lvm

I'm a longtime user of btrfs, and the thing I would point out is that btrfs raid is not true RAID. They tell you this on their wiki. I stopped using btrfs raid and now use btrfs for volume management and snapshots. My second HDD died, so I no longer need raid, anyway.

Offline

Board footer

Powered by FluxBB