Fedora Linux Support Community & Resources Center
  #1  
Old 9th November 2011, 08:53 AM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
btrfs with or without lvm?

What's the verdict for using btrfs dedicated to its own partition, vs. first setting up lvm and then formatting a lv as btrfs?
Reply With Quote
  #2  
Old 9th November 2011, 08:56 AM
leigh123linux
Guest
 
Posts: n/a
linuxfirefox
Re: btrfs with or without lvm?

Why would anyone want to use btrfs till it's complete?
Last time I checked there was no fsck for it.
Reply With Quote
  #3  
Old 9th November 2011, 08:58 AM
tox
Guest
 
Posts: n/a
windows_7firefox
Re: btrfs with or without lvm?

Quote:
Originally Posted by leigh123linux View Post
Why would anyone want to use btrfs till it's complete?
Last time I checked there was no fsck for it.
i think going from kernel 3.2 there is more btrfs updates but i agree with you, using btrfs is silly unless you wanna lose your data
Reply With Quote
  #4  
Old 9th November 2011, 09:06 AM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: btrfs with or without lvm?

Oy vey. These are answers to a question that was not asked. If you do that then I get to complain about why in the world there's a major f'n HURT ME button in the installer if it's such an evil file system, but still the question asked isn't answered.

---------- Post added at 03:06 AM ---------- Previous post was at 03:02 AM ----------

And also I am seeing a file 'btrfsck' in the base install of F16. So what is that if not btrfsck?
Reply With Quote
  #5  
Old 10th February 2012, 02:20 PM
finite9 Offline
Registered User
 
Join Date: Aug 2011
Posts: 15
windows_7firefox
Re: btrfs with or without lvm?

just thinking out loud here...

btrfs can grow and shrink at will, just like lvm, even though one is an fs, and the other is not.

The remaining reason for previously using lvm, besides being able to grow or shrink the volume, would be that you had separate filesystems on each lvm, and this would protect you from logical filesystem errors (i.e. if /var died for some reason, you still had all the other filesystems in working order).

You can also do this with btrfs (and even before the introduction of LVM) by creating separate partitions on the physical disk, each one containing a btrfs filesystem, but the partition is harder to manage (with Gparted) to grow and shrink, than an LVM volume would be.

So... I suppose that LVM is still useful and is needed. Set up everything as you would previously with LVM, but instead of creating ext4 filesystems, use btrfs!

This would apply to a laptop for instance, but if I was on a server (which I am) and wanted to create a new fs (one mount point) with several physical drives (which I do), then I would only use btrfs. No mdadm, no lvm, just create btrfs filesystem on one or two physical devices, then I could really easily use btrfs to add/remove devices, even if they differ physically. Yay!
Reply With Quote
  #6  
Old 10th February 2012, 03:39 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 32
Posts: 2,771
linuxfirefox
Re: btrfs with or without lvm?

Quote:
Originally Posted by finite9 View Post
btrfs can grow and shrink at will, just like lvm, even though one is an fs, and the other is not.
So can the venerable old ext2/3/4 (with the resize2fs command), although btrfs is more flexible about it. You'll still have to resize the containing volume separately, or with a higher-level program that knows both file system and volume management.

Quote:
The remaining reason for previously using lvm, besides being able to grow or shrink the volume, would be that you had separate filesystems on each lvm, and this would protect you from logical filesystem errors (i.e. if /var died for some reason, you still had all the other filesystems in working order).
Btrfs has sub-volumes, so that you can have multiple logical file systems in a single physical file system/volume. Having completely separate volumes is still safer though, in the sense that if a multi-sub-volume btrfs became corrupt, it wouldn't necessarily be contained to a single sub-volume.

Quote:
So... I suppose that LVM is still useful and is needed. Set up everything as you would previously with LVM, but instead of creating ext4 filesystems, use btrfs!
That should work just fine. Also I think there are still a few clever things that can be done with LVM that btrfs doesn't do. Some people feel that LVM is over-used as things are, and in those cases btrfs probably will make it completely redundant if it isn't already, but in general LVM still has its place.

Quote:
if I was on a server (which I am) and wanted to create a new fs (one mount point) with several physical drives (which I do), then I would only use btrfs. No mdadm, no lvm, just create btrfs filesystem on one or two physical devices, then I could really easily use btrfs to add/remove devices, even if they differ physically. Yay!
Ultimately, yes. Personally I'd stick to mdraid with ext4 on a serious machine for now though, at least until RHEL etc. make btrfs default. Let the bugs get ironed out first. But it certainly seems ready for home use (if you keep back-ups).

Gareth
Reply With Quote
  #7  
Old 10th February 2012, 04:40 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: btrfs with or without lvm?

LVM2 lets us do certain things that e.g. ext4, XFS, cannot do on their own.

a.) Much more flexible than disk partitioning, since it can span 2^32 disks, and produce as many logical volumes.

b.) Create a single logical volume (and thus a single ext4 or XFS volume) greater than the physical size of a disk.

c.) Migrate physical extents from one disk to another while the underlying file system is still available (i.e. upgrading from a smaller to larger hard drive, or replacing a drive suspected of imminent failure).

d.) Snapshots, I think up to 32.

e.) Has extent based striping and mirroring.

On those four issues, btrfs compares:

a.) Also much more flexible than disk partitioning alone. A single volume can be up to 16EB which is still quite a few drives, and subvolumes metted out from that. I'm not sure if the subvolume quote code is done yet, but will mimic LVs.

b.) Btrfs volumes can be larger than a single disk.

c.) Btrfs data can be migrated off a disk (balanced to other disks), while the filesystem is online.

d.) Also has snapshots, virtually unlimited. Can grow the file system even when you have rw snapshots online.

e.) Has chunk based striping and mirroring, and eventually RAID 5 and 6 like behavior. But btrfs also lacks the ambiguity found in either md, dm, or lvm mirroring, as to which mirrored data is correct, when they aren't identical (i.e. corruption of either data or metadata). Performance should be better too because instead of sector based mirroring, it's done in 256+MB chunks.

Plus a couple of extra things btrfs can do that LVM can't.

f.) Compression (LZO, gzip, and Snappy on the way in kernel 3.4)

g.) 16EB volumes. LVM is limited to 8EB.

h.) checksums on data and metadata (which LVM+ext4, nor XFS has).

So I think btrfs compares well to LVM's capabilities. For sure LVM isn't going away. But what we're seeing with modern file systems is incorporating aspects of LVM and RAID, and moving away from journals to COW.
Reply With Quote
  #8  
Old 16th February 2012, 09:00 AM
finite9 Offline
Registered User
 
Join Date: Aug 2011
Posts: 15
windows_7firefox
Re: btrfs with or without lvm?

Just a few questions regarding lvm-like functions:

If I create a btrfs raid-0 on 2 raw devices (no partition), what happens when I add a third device to that fs? does re-balancing occur automatically?

If I have the space to contain my files on only 2 of the devices in the 3 device raid-0, and choose to remove the third device from the raid-0 fs, will it work? Will it re-balance across the other 2 devices, then allowing me to remove the third device?
Reply With Quote
  #9  
Old 16th February 2012, 07:13 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: btrfs with or without lvm?

You'd have to search the btrfs mailing list to see if re-balancing is expected to be automatic in the future. Presently you execute 'btrfs filesystem balance'. I'd like to think when adding a device, we'd eventually get an automatic re-balancing, but there may be good reasons for not doing so by default.

When removing a device 'btrfs device remove' re-allocates extents to other devices, similar conceptually to LVM's pvmove.
Reply With Quote
  #10  
Old 16th February 2012, 07:29 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,870
linuxfedorafirefox
Re: btrfs with or without lvm?

Re-balancing can be very slow, and would impact performance (until it finishes). It also might be a bit of a problem if there is a crash while it is running. Re-balancing may also cause ENOSPC ("Error NO SPaCe left on device") oops, which can only be recovered by deleting a large file...

Small filesystems shouldn't have a problem though.
Reply With Quote
  #11  
Old 16th February 2012, 08:17 PM
chrismurphy Offline
Registered User
 
Join Date: May 2010
Posts: 970
macoschrome
Re: btrfs with or without lvm?

I'm guessing that if you want striping performance of 3 drives, as in a conventional RAID 0, you'd want to re-balance. Otherwise seems the behavior would be more like concatenation/spanning, without rebalancing.

---------- Post added at 01:17 PM ---------- Previous post was at 01:13 PM ----------

** assuming the first two drives, in this example, were already full.
Reply With Quote
Reply

Tags
btrfs, lvm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BTRFS and F16 tox F16 Development 10 10th August 2011 12:48 AM
[SOLVED] BTRFS May Not be default in F16? tox F16 Development 4 21st July 2011 06:43 AM
btrfs - More info? keenanparm Using Fedora 15 15th July 2011 09:53 PM
btrfs - add RAID1 partition to existing encrypted btrfs parition techmum Using Fedora 0 4th July 2011 01:21 AM
BTRFS - use as default FS? Why/Why not? Ben.Hahlen Using Fedora 2 9th June 2011 01:06 PM


Current GMT-time: 13:25 (Saturday, 01-11-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Burbank Instagram Photos - Alsdorf - La Cabima Photos