LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2023, 12:05 PM   #1
bg368
Member
 
Registered: Nov 2006
Location: USA
Distribution: Debian
Posts: 43

Rep: Reputation: 12
LVM or btrfs


Hello all,
I have a sort of dilema and could use some help.
I recently wiped a hard drive and installed linux (Linuxmint if it matters), and since I am trying to stop distro hopping so much I gave the installation the whole disk.

The installer gave me the option to automatically set the disk for LVM. I did this. I know NOTHING about lvm other than I understand it allows for snapshots. I like that idea because I've used btrfs with Timeshift and it was good for me.

Little did I know what a rabbit hole LVM is. I am wondering if I should just reinstall the whole thing with btrfs (mainly for snapshots w/ Timeshift), or try to learn something about LVM.
I don't want to get into the same situation as when grub came to be. I didn't bother to figure out what was going on and just used it and now I have a hard time trying to catch up.

As usual, any and all advice is greatly appreciated.
 
Old 04-03-2023, 02:00 PM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,714

Rep: Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734Reputation: 2734
It depends upon your life choices and objectives. If you want to administrate servers, there is more power and utility in LVM, which is quite mature and feature rich (and still improving from time to time). If you plan on just using commodity client side devices like laptops with only one or two drives (No RAID-5/6) then BTRFS is a more modern option that should age well without requiring the learning curve.

Note that BTRFS serves the same purposes as LVM PLUS the filesystem layed onto the LVM devices. (Normally EXT4)

LVM gives you more power and growth options, BTRFS has some power and options built-in. For a one or two drive system simple has the advantage. For large storage and data servers the extra power and utility of EXT4 on LVM pays off in the long run.

The nature of the media may matter more. BTRFS has SSD recognition and automatic tuning for digital storage, something LVM and EXT4 lack. (Although they may include some of that in the future.)

Also, EXT4 is faster for most applications at this time. BTRFS does not have BAD performance, in general, but it has some catching up to do. On the other hand if you have digital (SSD) storage then storage speed is probably no longer your bottleneck anyway and either is fine.)

If installing on a laptop or small desktop (One or two internal drives only) then I would go with BTRFS. If you have a server class machine with 6 to 24 fast internal drives or a fast-wide SCSI drawer for multiple drives then go LVM and run EXT4 on top.
 
2 members found this post helpful.
Old 04-03-2023, 02:06 PM   #3
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 493

Rep: Reputation: 182Reputation: 182
For a home user (like me), I'd just stick with ext4 and be done with it. Backup your data periodically and your golden. Keep It Simple and fast. My 2 and 1/2 cents.
 
3 members found this post helpful.
Old 04-03-2023, 05:52 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Use what you got. LVM has all you will likely need (as a home user too), but you apparently need to do some learning in your current setup. I don't like the snapshot setup in LVM compared to btrfs, but it can be made to work.

If LVM is a rabbit-hole, btrfs is the warren - your use of it in the past likely just skimmed the surface and used significant constraints imposed by the distro. And tool in this case. I've used it for over a decade, but it needs a lot of study to use fully. And when it breaks you get to keep the pieces.
I also use LVM when appropriate, so either will do the job.
 
1 members found this post helpful.
Old 04-03-2023, 06:08 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
LVM = Logical Volume Management is something that you do want, even if you don't need it yet. It doesn't cost you anything to have it.

Simply stated, LVM separates the idea of "a physical volume or partition" from "a mount point." A mount-point can now be divided among multiple physical resources, and it all happens behind the scenes. One day, when this-or-that volume runs out of space, you will be glad that you have it. You can simply "expand the physical storage pool" by adding another drive, and blissfully ignore how it actually works ... because "it just works." And, until that day happens, you can simply ignore the fact that LVM is there.

Last edited by sundialsvcs; 04-03-2023 at 06:10 PM.
 
1 members found this post helpful.
Old 04-03-2023, 06:53 PM   #6
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 493

Rep: Reputation: 182Reputation: 182
Quote:
One day, when this-or-that volume runs out of space, you will be glad that you have it.
That day is far far far far away here. When you have Terra bytes of space and only using a fraction of relatively 'cheap' disk space, it isn't going to happen. By the time it does, you'll be upgrading the system anyway years down the road or you'll be six feet under... On the other hand, if you 'know' your are accumulating data in Terra bytes per year (video surveillance, maybe?) , then it 'may' be worth it to use LVM. However it is easier to stick in another 18 TB HDD or 4 TB SSD and off you go. LVM just doesn't need to be on running on most home machines (and probably most business machines).... IMHO. Extra complication that just isn't needed.
 
2 members found this post helpful.
Old 04-03-2023, 08:09 PM   #7
bg368
Member
 
Registered: Nov 2006
Location: USA
Distribution: Debian
Posts: 43

Original Poster
Rep: Reputation: 12
Thanks fellas, all sage advice. For the record, I am going to re-install with ext4. Maybe its a good idea to stick to some familiarity. I shouldn't have too much need to recover from my usual distro-hopping fiascos, because I'm done with that. Famous last words?
 
1 members found this post helpful.
Old 04-06-2023, 09:14 PM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,679
Blog Entries: 4

Rep: Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947Reputation: 3947
I respect your professional opinion, @rclark, but do not share it. I perceive no "complication" from having LVM installed. Most of the time I simply ignore the fact that it is there, and it very kindly lets me do so. But I've always been glad to have it when I needed it.

Last edited by sundialsvcs; 04-06-2023 at 09:16 PM.
 
Old 04-06-2023, 11:41 PM   #9
rclark
Member
 
Registered: Jul 2008
Location: Montana USA
Distribution: KUbuntu, Fedora (KDE), PI OS
Posts: 493

Rep: Reputation: 182Reputation: 182
That's ok . We all have different opinions and even the reasons for them -- even good reasons. All good. That said, tonight, I created a current backup of a a running 500GB SATA SSD drive which was getting a bit long in the tooth so to speak (over 3 years old and half full) -- just in case. Then used clonezilla to clone it to a new 2TB m.2 PCIe SSD. Took all of 30 minutes at the most and I was back up and running on the new drive with oodles of space. Hopefully the 800 TBW rating of the new drive will keep it going for another 3-5 years.
 
Old 04-07-2023, 06:57 PM   #10
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
One advantage that you can profit from directly with btfs as an end user is that you can create snapshots, make some changes, such as testing things that might break your system, and you can (in most cases) restore it to a previous state selecting the snapshot directly from the grub menu, even for the root partition. LVM doesn't allow that (well not as easily and the snapshots are limited by size – if you exceed the size difference, they disappear). You can also very easily create subvolumes with btrfs, whereas with LVM it's much more complicated, also because LVM will be limited by whatever filesysem you're using on top of it.

For reference: https://sysguides.com/install-fedora...nd-grub-btrfs/

Last edited by vincix; 04-07-2023 at 06:58 PM.
 
Old 05-03-2024, 01:44 PM   #11
CzarStoat
LQ Newbie
 
Registered: May 2024
Posts: 1

Rep: Reputation: 1
Quote:
Originally Posted by vincix View Post
One advantage that you can profit from directly with btfs as an end user is that you can create snapshots, make some changes, such as testing things that might break your system, and you can (in most cases) restore it to a previous state selecting the snapshot directly from the grub menu, even for the root partition. LVM doesn't allow that (well not as easily and the snapshots are limited by size – if you exceed the size difference, they disappear). You can also very easily create subvolumes with btrfs, whereas with LVM it's much more complicated, also because LVM will be limited by whatever filesysem you're using on top of it.
Sorry this is an old thread. But just wanted to chime in.

I find LVM snapshots are very easy to do and, other than the root partition, they have the added advantage of not requiring a reboot to restore to the previous state. No need to mess with grub. I just have to be able to unmount the lv first. You can restore the root partition just fine, it just requires a reboot to go through the process as it is active.
A common use case for me is to snapshot my web application and database before an upgrade. And if I find I don't think the upgrade is ready for prime time, I can easily revert back without rebooting. I don't worry about the storage limits as the way LVM is designed, generally, you have a lot of smaller partitions and plenty of free space yet to be allocated. Just assign what you need, or if you must, make it the size of the LV it's snapping. Yes it's something to watch out for, but it's not really a problem as there is rarely a need to be stingy. The snapshot is only temporary after all.

In LVM land, each LV is a different device and you can use different filesystems on each logical volume (Some think ext4 is better for a database for instance) including btrfs itself. Which brings me to the point. Honestly I have yet to see any real compelling reason not to use both and just use the advantages of both. BTRFS is an excellent file management system with a lot of useful tools. LVM is an excellent volume manager with its own set of tools for allocating, resizing volumes on the fly. Yes, there is a bit of overlap in functionality but they are very different. LVM gives you the ability to handle things on the block level if you need it including moving whole partitions, live, across filesystems while the system is running (Very handy when I once remotely swapped to an upgraded RAID array).
 
1 members found this post helpful.
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] docker on btrfs using much space in /var/lib/docker/btrfs taumeister Linux - Containers 2 01-25-2018 04:13 PM
btrfs filesystem df /mnt/btrfs/ shows bothe data and metdata with raid1 and single. gonus Linux - Software 3 07-17-2014 02:48 PM
LXer: Rollback To A Working State With btrfs + apt-btrfs-snapshot On Ubuntu 12.10 LXer Syndicated Linux News 0 11-25-2012 10:42 AM
ext4 vs btrfs, and with btrfs do I still need to use LVM? blue_k Linux - Software 4 08-17-2012 11:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration