LWN.net Logo

Fedora and LVM

Fedora and LVM

Posted Nov 2, 2012 12:02 UTC (Fri) by marcH (subscriber, #57642)
In reply to: Fedora and LVM by cmccabe
Parent article: Fedora and LVM

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


(Log in to post comments)

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.

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