[sf-lug] LVM ? :-)

Michael Paoli Michael.Paoli at cal.berkeley.edu
Wed Nov 11 19:12:22 PST 2015


I quite like LVM, and find it to work most excellently.  Yes, it is yet
another "layer" to work/deal with, but much of the time, it's very well
worth it.  That doesn't mean everyone likes it nor that it should be
used in all situations.  And yes, Fedora/Red Hat/CentOS - and probably
some other distributions too - default to using LVM on installation (and
most at least offer it as option, even if it's not their default).

E.g. being able to dynamically grow and relocate filesystems - most
notably because I have them atop LVM, I find to be one of many great
advantages to using LVM.  On the other hand, if one is dealing with,
say, a single laptop computer, only one drive in it, and novice user,
generally quite preferable to *not* have LVM in the picture - as the
user will generally have more than enough to deal with and learn,
without the additional layer of LVM - so in such a case LVM would
probably be more of a disadvantage than advantage (and just doing
everything on one big filesystem is typically much simpler for novice
user in such a case, and easier for them to deal with down the road).

On the other hand, even with a single drive computer, LVM can still be
quite advantageous in many circumstances.  E.g. my personal laptop, how
do I have that set up?  One fairly small boot partition, the remainder
as logical partitions of equal size, all using LUKS, and LVM atop that.
I find it to be nice highly flexible way of dealing with many
filesystems - including filesystems of various types - and being able to
grow - and even relocate - filesystems, if, when, and as desired.
Random examples from last week - need a bit more space on a filesystem
or two, want to (semi-)temporarily add another filesystem to save cache
of a bunch of downloaded packages?  No problem, all done dynamically, no
need for pesky reboots or repartitioning or the like.  Another different
example from last week - setting up a virtual machine - which would only
ever be in that virtual environment, and one where adding/growing
virtual disks is quite easy - but repartitioning is quite inconvenient
and generally requires a reboot if it's where the operating system is
running or the data is otherwise being used.  How did I set it up?
Initially two (virtual) disks - one quite small - just a single
partition (taking all the available space) - for boot (it was CentOS,
fairly fat boot at around 512 MiB).  A second virtual disk given
entirely to LVM - whole disk as a PV, no partition table.  That 2nd
disk for the operating system proper - everything except the separate
boot disk.  And application data and such?  If it's local and
non-trivial in size, will just add a disk and make a separate VG for
that, giving the whole disk to LVM.  The virtual disks can be added
hot, and made larger while they're in use too.  With LVM, no need to
repartition, can just grow the PV (and thus the VG), and can then grow
existing LV(s) or add more LV(s) as desired.  No pesky partitioning or
reboots to deal with.  In production environments that can be
important, if not crucial.  No pesky partitioning or reboots to deal
with.  In production environments that can be important, if not
crucial.  No pesky partitioning or reboots to deal with.  In production
environments that can be important, if not crucial.  No pesky
partitioning or reboots to deal with.  In production environments that
can be important, if not crucial.  No pesky partitioning or reboots to
deal with.  In production environments that can be important, if not
crucial.  No pesky partitioning or reboots to deal with.  In production
environments that can be important, if not crucial.  No pesky
partitioning or reboots to deal with.  In production environments that
can be important, if not crucial.  Oh, I also generally prefer to do
swap under LVM too.  And often not as one single big chunk, but, say 4
equally sized chunks.  Need more swap later? ... or don't need so much,
and want to free it up for something else?  Again, with LVM, can change
that all dynamically, no need for repartitoning or rebooting.

> From: "Bobbie Sellers" <bliss-sf4ever at dslextreme.com>
> Subject: [sf-lug] SF-LUG Meets this Sunday November 1, 2015 plus  
> report of October 19 Meeting.
> Date: Mon, 26 Oct 2015 09:21:19 -0700

>     I had my suspicion that it was due to the fact that seeking a
> rapid solution to setting up partitions for Fedora he had chosen
> LVM.  Jim later confirmed that was the case.
>     LVM requires the use of special tools and procedures to  reduce
> or change the size of a partition.  Once Jim verified that the LVM
> was the problems I was able to find a reference online and e-mailed
> the same to Maestro.





More information about the sf-lug mailing list