We recently had a discussion about LVM as a tangent on another thead, started
by me saying:
"Finally, if you let them do automatic partitioning, some GNU-Linux distros
will create LVM partitions. In theory, these make it easier to resize
partitions etc, but GParted doesn't seem to be able to work with them, and
I've found them to be a headache. Before using LVM as part of a production
system, I suggest setting up some LVM partitions on a spare drive and getting
confident with the commands that work with them."
https://trisquel.info/en/forum/how-do-i-stop-distro-hopping#comment-122645
When I installed Trisquel 7 on my desktop box (click my avatar and scroll
down for the specs), I let the installer do the partitioning. Here's the
partition scheme I ended up with (see attached file for screenshot of Gparted
where I got this info):
- ext4 primary partition: 18.63GB
- extended partition: 130.38GB (the rest of the disk)
- lvm2 pv "partition": 130.38GB (same size as the extended)
A few points to note:
- the LVM "partition" is mounted as /home
- no swap partition has been created (although there may be swap space
configured in the primary partition?)
- the scare quotes around "partition" are there because in the discussion
that follow on from my comment above, Magic Banana insisted this is not a
partition, despite the fact that it appears to behave like one (listed in
GParted as a partition, takes up space on disk etc).
So, let's say I want to carve off some space to install a second OS. Normally
I would simply use GParted (or its underlying command-line tool GNU Parted)
to resize a partition with sufficient free space, and create my new
partition(s). But GParted doesn't know how to resize LVM "partitions", and
neither does it know how to delete them. My understanding of what the
Trisquel installer has done is that it has added the extended partition to
LVM as a "Physical Volume" (thus the "pv"), effectively making it an LVM
partition that can only be managed with LVM tools. Here are some
n00b-friendly instructions for working with LVM using the command-line, which
I've found helpful when I end up in this situation:
https://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
Mangy Dog pointed out this tool on the thread linked above, which I'm going
to try out now:
"There's a pretty good graphical utility for configuring your Logical
Volumes, this tool helps to understand (not that easy !) and visualize these
LVM Volumes :
--system-config-lvm
"