Posted Nov 1, 2012 1:15 UTC (Thu) by PaulWay (✭ supporter ✭, #45600)
Parent article: Fedora and LVM
One thing I love about LVM, and hate about not using it, and the fundamental reason why I think it should be used by default is:
Flexibility.
Sure, you can always do equivalent operations using raw partitions to the standard uses of LVM - setting up new partitions after your initial install, extending partitions, moving entire partitioning systems to new disks without downtime, etc. But they're painful, low-level operations that require a lot of hassle and are fraught with the possibility of adgering your entire system. Get one partition number wrong, forget that some numbers are written in 512-byte sectors and others in 2048-byte blocks and still others in 1024-byte kilobytes, and you might as well say goodbye to your system and start again.
Yes, you can use special graphical tools to reduce the likelihood of error on some of these things. LVM has one of those too.
Yes, a competent sysadmin can work around all these issues. LVM makes all of that easier.
Yes, if you know what you're doing you can set up your system with a spare set of partition entries just in case. But LVM saves you from having to know in advance that you might, at some point, need a second root partition or whatever.
Yes, the 'normal user' might not see those things. And the 'normal user' might never see a bash prompt, but we still install bash because of all the other uses of it.
LVM provides flexibility, future-proofing, and makes complicated operations simple.
I see lots of packages - systemd, LVM, SELinux - where there are plenty of vocal anecdotes of people who didn't understand it and disabled it and now never use it. I also see lots of anecdotes of people who swear off using AMD processors, or Seagate hard drives, or Asus motherboards, or whatever, because of that one time that they got hurt by some weirdness that they didn't understand at the time. This is magical thinking, people. Learn the new systems, rather than stepping away from them. Question your habits, rather than being a slave to them.
(Unfortunately for me, I installed F18 alpha at a stage where LVM didn't even seem to be offered as a partitioning option.)
Posted Nov 2, 2012 0:23 UTC (Fri) by marcH (subscriber, #57642)
[Link]
> Learn the new systems, rather than stepping away from them. Question your habits, rather than being a slave to them.
After reading the whole thread again, it's becoming very clear that any disk indirection layer like LVM is a "mobile phone-like" technology: people who never really used any of its features still don't see the point, while the people who got used to it can never go back.
Very same thing with Decentralized VCS.
This is of course independent of the quality of LVM as a specific product instance.
Fedora and LVM
Posted Nov 2, 2012 6:38 UTC (Fri) by cmccabe (guest, #60281)
[Link]
I have used both LVM and non-LVM. I currently don't choose to install it on my desktop or laptop computers. I admit to not being the biggest expert on LVM, but I don't think my choice is irrational.
Here's why:
* I often move my old partitions to a new Linux distro. Since the initrd / initramfs / etc code gets rewritten approximately every release, porting a complex setup is painful. On the other hand, just mounting a partition is easy.
* If you use something like RAID0 (I forget what LVM calls it), and one drive fails, all of your data is gone. "Too big to fail," unfortunately doesn't apply to volume groups. I'm sure there's a way to RAID5 it, and so forth, but then you have to start worrying about things like whether the drives are the same size, what is the correct stripe size to use, whether write barriers are fully supported on your configuration, and so forth. Again-- if you value your time, simple is better.
* If I really need to change the size of an ext3, ext4, etc. partition, the gparted boot disk can do it easily. I can even move partitions with dd or rsync (although that is rarely necessary.)
* Sometimes I even have to give more space, or take space away from, the OS of the Beast (yes, I still have one computer that dual-boots.) LVM can't help me with this-- in fact, it hurts severely, because gparted can't resize a partition which LVM is managing. So if I forget to uncheck the LVM install checkbox on my dual-boot PC, and I need to shrink the Windows partition, I'm screwed.
LVM makes more sense in a server environment, I think. Of course, even in a server environment, you often have things like RAID cards doing this kind of thing for you. Like everything else in storage, at the end of the day, it really depends on your use case.
Fedora and LVM
Posted Nov 2, 2012 7:24 UTC (Fri) by dlang (✭ supporter ✭, #313)
[Link]
frankly, the way things are going today in server environments, you don't resize partitions, you create a new VM and trash the old one.
Even if you are running on bare hardware, the trend is strongly towards either using network storage, or just reimaging the system if you have something as major as partitioning wrong.
on desktop/laptop systems, there aren't a lot of reasons for doing anything other than 'one big partition' (although I modify this to two small partitions for / and everything else for /var, with /home being a link into /var to make major OS changes easier)
Yes, you can make lots of small partitions and leave space unallocated to add later, but the odds of that being better than just using the entire disk as one partition are pretty low (especially for the average user)
Fedora and LVM
Posted Nov 2, 2012 12:02 UTC (Fri) by marcH (subscriber, #57642)
[Link]
> So if I forget to uncheck the LVM install checkbox on my dual-boot PC, and I need to shrink the Windows partition, I'm screwed.
I understand you are "screwed" only because you cannot live without gparted.
Dual-boot is where I found LVM really, really kicks ass.
Realize you allocated too much space for Windows. Shrunk Windows and re-allocate what you just got to ANY other partition ANYWHERE on the system without moving anything. Simply cannot be done without an indirection layer like LVM.
Fedora and LVM
Posted Nov 2, 2012 23:37 UTC (Fri) by cmccabe (guest, #60281)
[Link]
I didn't realize that LVM could handle this scenario. Thanks for pointing that out.
To be honest, I never like to make changes to the partition table of a disk without rebooting or hotplugging the disk. The kernel sometimes doesn't refresh its view of the partition table (or has this been fixed in newer kernels?). So while online resize of physical (windows) partitions without rebooting may be possible in theory, I'm not sure if I would choose that route for an internal disk.
Fedora and LVM
Posted Nov 12, 2012 3:01 UTC (Mon) by mfedyk (guest, #55303)
[Link]
I believe you can have the partition table reread while one or more of the partitions have mounted filesystems on them in the 3.6 kernel now.
That may be a reason for the attempted change in f18. The ability to extend a partition online without needing lvm.
Fedora and LVM
Posted Nov 12, 2012 3:46 UTC (Mon) by steffen780 (guest, #68142)
[Link]
Posted this further above, but this has become a rather lengthy comment thread.. just run partprobe. I've used this with mounted in-use FSs many times without any problems.
Disclaimer: I have no idea if doing this is dangerous, but it has never bitten me.
Fedora and LVM
Posted Nov 3, 2012 18:14 UTC (Sat) by Cato (subscriber, #7643)
[Link]
GParted can cover this fine including the Windows volume shrinking:
- shrink Windows volume
- move any partitions as required until the free space is next to the partition you want to enlarge
- drag the boundary of that partition to fill the free space
- hit Commit button
- come back some time later to find it's all done
For a desktop/laptop this can be done overnight, and is so much easier than having to mess with LVM (as I used to do, making copious notes on the right commands so I could remember them next time, since such rearrangements are not a weekly occurrence.)
LVM is great for other use cases but unless you have a very high uptime requirement for your PCs, and are expert in LVM, it's not for laptops/desktops.
Of course if there was a Gparted-like tool for LVM, this might change the picture - why reboot into Gparted if an "LVM edit" GUI tool does the same thing?
Fedora and LVM
Posted Nov 4, 2012 11:28 UTC (Sun) by marcH (subscriber, #57642)
[Link]
> move any partitions as required until the free space is next to the partition you want to enlarge
The only reason you find this "easier" (I clearly don't) is because GParted has a graphical interface while LVM has not (yet?).
To the best tool is quite often the one you are the most familiar with.
When repartitioning I trust nothing and no one (neither GParted nor myself). So I much prefer spending 10 minutes googling and reading the LVM man pages and eventually do something conceptually simpler and that involves 5 or 10 times fewer operations, i.e, 5 or 10 times less chances for something to break.
Fedora and LVM
Posted Nov 3, 2012 18:10 UTC (Sat) by Cato (subscriber, #7643)
[Link]
Actually you can just use Copy and Paste on entire partitions in Gparted - very nice feature e.g. if you want to move to a larger disk then expand some partitions.
Fedora and LVM
Posted Nov 4, 2012 7:13 UTC (Sun) by Cato (subscriber, #7643)
[Link]
GParted has just added (as of mid Oct) support for read-write of LVM2 PVs - http://gparted-forum.surf4.info/viewtopic.php?id=16575 - of course, the usual caveats to bleeding edge code apply, but if you have good backups it would be worth a try.
Beginning LVM support in GParted
Posted Nov 15, 2012 17:37 UTC (Thu) by JanC_ (guest, #34940)
[Link]
Thanks to our new GParted developer, Mike Fleetwood, for working on that... :)
Fedora and LVM
Posted Nov 3, 2012 18:08 UTC (Sat) by Cato (subscriber, #7643)
[Link]
Actually I've used LVM a fair bit on various Linux systems, and got burnt by it, including significant data loss (write barriers not being implemented, mostly). Then I was very anti-LVM, now I have a more balanced position, in my view: it's good for servers where high uptime is needed, but overkill for most desktops where raw partitions and Gparted are safer and easier.
I am about to extend use of LVM on one server where I need to add a large disk, and want a single huge LV across several disks. (Something that the raw partition model can't deliver).
However, on a laptop/desktop I would not use it (perhaps for a desktop to span disks, but not within a single disk.)
I would not have spent this much time ranting about LVM if I had not used it quite a lot...
Fedora and LVM
Posted Nov 3, 2012 20:39 UTC (Sat) by dlang (✭ supporter ✭, #313)
[Link]
> t's good for servers where high uptime is needed,
being a bit picky here.
servers don't need high uptime, the services they provide need high availability time. This is not the same thing (even though it sounds like it should be)
pushing for high uptime on a single server will get you quite a ways towards high availability time, but then you hit a wall and you need to move to cluters of machines. Once you move to clusters of machines, the need for high uptime on a each individual server drops dramatically.
While the clustering adds complexity, this now allows for management of the indivudal servers to be much simpler as you are no longer racing the clock for each change. This (usually) results in a very dramatic improvement in service availability, and a dramatic _decrease_ in _unplanned_ server downtime. there is more _planned_ server downtime, but it's the unplanned downtime that your customers notice.
There is a small (and shrinking) pool of application types that are really hard to cluster and really do need high uptime, but far fewer than you would think.