You are not logged in.

#1 2012-03-02 10:01:14

dado1981
Member
Registered: 2012-03-02
Posts: 3

btrfs vs LVM+DM-RAID

Hi all,

this is my first post, so hello everyone!

I was wondering recently for my new setup, which must contain both RAID0 and RAID1 (mirrored) partitions, which one is better for that... I was using LVM and MD-RAID until now, everything worked OK. Nice feature in btrfs seems to be online FS resize (eg. no umount), which annoyed me with LVM.
Actually, why did they put RAID features in a filesystem in the first place with the btrfs, when it is already available and working on millions of production installations of Linux around the world with the existing software (LVM and Linux soft RAID md), proven stable over the years?
So what do you guys think, is btrfs stable enough right now (I noticed they did finally complete a fsck utility for that FS), and what is advantage of btrfs subvolumes over LVM+MD?

Thanks,
Davor

Offline

#2 2012-03-16 04:03:04

Evanlec
Member
From: NH, USA
Registered: 2007-12-16
Posts: 140
Website

Re: btrfs vs LVM+DM-RAID

I played around with BTRFS using its raid functionality, which made it easy to add/remove devices from the raid, but unfortunately it was just too buggy.
I had to re-install arch twice because of btrfs and I finally said screw it and went back to ext4 + mdadm.
My advice, stick with what you've got for now
BTRFS is almost there, but not quite, and I learned that the hard way.

Just give it another 3-4 months and I'm sure it will be a whole lot more stable. Maybe give it 6 months to be safe.

Offline

#3 2012-03-16 06:00:54

dado1981
Member
Registered: 2012-03-02
Posts: 3

Re: btrfs vs LVM+DM-RAID

Evanlec wrote:

I played around with BTRFS using its raid functionality, which made it easy to add/remove devices from the raid, but unfortunately it was just too buggy.
I had to re-install arch twice because of btrfs and I finally said screw it and went back to ext4 + mdadm.
My advice, stick with what you've got for now

But just out of curiousity, how long ago was that you played with it and had major problems, so bad that you had to reinstall? They now do have a fsck utility... I'm asking because kernel people release kernel versions every few days, I'm barely keeping track (compile my own kernel, because I don't want preemption and 100Hz clock on a server), I'm on 3.2.11 now... I regularly do my "pacman -Syu", every few days or whenever I remember to do so. So I bet this FS gets less and less buggy every day  and I wouldn't torture it too much if I were using it (like doing unclean shutdowns, cutting off power, etc) smile

I did my own research in the meanwhile. I thought I would use it's RAID functionality which is really simple, but where I was wrong in my assumptions was to use it's subvolumes in place of LVM logical volumes... That's not quite the same thing, as although you can mount a btrfs subvolume on a different mount point, such as for example /var/log, but you cannot limit it's size and resize it later when needed like LVM. That's what I think at least, I created filesystems on files instead of real block devices while playing with it (loop device) so I wouldn't screw something up, and I couldn't in any way create a subvolume of specified size or resize it. Maybe I didn't do my reading/researching very well, though...

So is it possible to create a btrfs subvolume of a set size and resize later or at least mount it with a size limit? If not LVM will stay always on my systems as this is not a replacement for it, and for RAID, why would one use btrfs for it when there is already MD?
I'm asking about a future here when btrfs will be mature, if someone is knowledgeable of plans for this FS, why would one use it for RAID and volume management instead of existing software (LVM2, mdadm) that works very well, and did so for many years?

Thanks.

Offline

#4 2012-03-16 23:07:24

Evanlec
Member
From: NH, USA
Registered: 2007-12-16
Posts: 140
Website

Re: btrfs vs LVM+DM-RAID

I was using BTRFS with its built-in raid capability (raid 0) on two SATA drives.

The filesystem worked mostly fine, and performance was good (though nothing really
noticeable compared to ext4). Playing around with all of the tuning options is kind of
neat but can screw you up, (especially the compression options).

I think what really caused me so much difficulty was in using the built-in raid functionality
I would use `btrfs device add /dev/sdb' or w/e so I could get raid0 but once I added the wrong
device and then even after removing it, the `btrfs subvolume show' command said
the device was still there.

I don't recall the specifics, I just recall that the btrfs tools were not well documented at all,
and the information / error messages they reported back to me were often times confusing,
inaccurate (for ex free space % is often way off), or just plain wrong (telling me I have 2 devices
in my filesystem when I just removed the second device).

Anyway, to sum it up, I think my major issues revolved around trying to use the built-in raid functionality
of BTRFS which is clearly not very mature yet.

If you are planning to stick with mdadm and not use btrfs-raid then I think you'll have much better luck.

As far as subvolumes...the concept of them is a little confusing to me, they are not partitions, but they
are also not like LVM volumes, they're really more like just .... directories.

Anyways, I think you can set quotas or something with subvolumes but im not sure. Otherwise the only
resizing you do is for the entire filesystem itself.

Offline

#5 2012-03-17 03:12:03

dado1981
Member
Registered: 2012-03-02
Posts: 3

Re: btrfs vs LVM+DM-RAID

Yes, I thought of quotas, but they weren't working last time I checked smile
Subvolumes are like directories, but you CAN set different mount options for them, ex. turn off or on compression, but I didn't manage to set fixed size, which is pretty important... Subvolumes are not block devices, nor they emulate block devices, that's the problem...
In my little research, RAID functions worked very well, but I just don't know why I would use them instead of MD.
Yeah, you won't get real free space if you use "df -h" of "df -k", but that's expected if you mount with compression, that IS DOCUMENTED.
I'm really just interested of the idea behind brtfs, now or when it will be finished and mature, why all those features in it? How would one use it in a multiple disk setup, in example, on a server with several physical discs where people would want mirroring (RAID-1) and logical volumes spanning several physical storage devices in a single filesystem, which is possible with LVM... And later resize that volume if need comes, LVM allows that.

Offline

Board footer

Powered by FluxBB