LWN.net Logo

Fedora and LVM

Fedora and LVM

Posted Nov 2, 2012 6:38 UTC (Fri) by cmccabe (guest, #60281)
In reply to: Fedora and LVM by marcH
Parent article: Fedora and LVM

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.


(Log in to post comments)

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... :)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds