I've used LVM – Linux's "Logical Volume Manager" – before. Intuitively it makes sense, and is almost-magically awesome: you can take a bunch of separate disks, and represent them as one big disk! Not only that, you can later add more disks to make an even bigger virtual disk, completely transparently.
Previously all I've done is follow some instructions and type out a
few commands. Actually understanding what I was doing beyond the
rough concepts was a different thing. The commands, and there are
plenty, have names like
lvconvert, which were
completely unfamiliar and after a short search which got bogged down
in terminology, I moved on.
The third time I resolved to actually dig in just a bit more, and happily the terminology at least now makes more sense! The key for me was the high-level hierarchy, and secondly the similar structure of the commands (once the intuitive concepts made a bit more sense).
Physical Volumes: These are the disks themselves1. Commands all use the
Volume Groups: These create a storage pool out of the physical volumes; every virtual disk is drawn from a single volume group. Commands all use the
Logical Volumes: These are the "virtual disks" that you mount as a single block device. This is what gets mounted in the server's file system. Commands all use the
This isn't intended to be a tutorial, but once I had absorbed the high-level concepts, there's a certain uniformity to the commands and they become less mysterious. Check the man pages or an actual tutorial for the necessary options.
pvcreate creates (registers?) a physical volume;
vgcreate creates a volume group;
lvcreate creates your logical
Listing: In a nod to
pvs to list physical volumes;
Extending: You may also be interested later in adding more storage.
This will involve
vgextend to add another physical volume to your
logical volume, then
lvextend to increase the size of the logical
Questions I still have
The main thing I don't understand is where the metadata exists: how
does LVM retain information about what groups, etc it has? I suspect
it is in the
/dev file system, but I'm guessing beyond that.
I suspect there has been some changes in either convention or
operation. When you create a logical volume
lv1 in a volume group
vg00, it seems it can be accessed at either
/dev/vg00/lv1. In fact in the system I just tested, both were
symlinks to (for me)