What LVM Does
LVM is a fairly complicated technology, so I won’t be able to explain exactly what goes on behind the scenes, but explaining the setup is still game. LVM operates on its own partitions, meaning that instead of creating ext4 or any other partitions, you’ll be creating LVM partitions. Once you have made an LVM partition on each of your hard drives, you can then use a tool to combine hard drives together into one Volume Group (or VG for short). From here you need to create a Logical Volume for each partition you want to make in your Volume Group. These Logical Volumes can stretch across multiple hard drives.
Performing The Operations
Knowing what it does is great and all, but how do you actually do it? There are two ways you can go with this setup. One involves using the terminal, but that can easily get confusing, and the commands themselves aren’t that easy to figure out either. Instead we can use a great GUI tool to do everything for us! Fedora ships with this tool by default, so check to see if you can install it via your own provider.
Although package names change from distro to distro, you’ll probably be wanting to look for something similar to system-config-lvm. Before you begin, make sure that you have a partition with your preferred filesystem on each hard drive so you can correctly initialize them.
The GUI Tool
When you start the tool, you’ll be greeted by something similar to this screenshot, but with more white space. I already have a LVM going on in my system, so whenever I open it I am greeted with some graphs. From here you can go to the left pane and go into “Uninitialized Entities” and choose the partitions you want to turn into an LVM. If you need help choosing which one is the correct one, you can use GParted or Palimpsest to help you out.
Click on “Initialize Entity” and acknowledge the warning. Once that is done, you can go ahead and create a new Volume Group. It gives you a number of options, but they can stay at their defaults. Just name the Volume Group, and you’re done. It’s preferable that you put “vg_” as a prefix, just to help differentiate between names later on if necessary. You can repeat the same process on your other hard drives, except that you’ll be adding the rest to a VG, and not creating a new one every time.
Now you can go to your new Volume Group and click on Logical View. You have almost everything set up, except for the Logical Volume. Click on the appropriate button to do that and you’ll see another window full of configurations. You can type in a name (preferably with a “lv_” prefix), how large it should be based on the available space in the VG, what filesystem it should be and where to mount it, and if the volume should be mirrored across two hard drives. Be warned though that if the hard drives have different sizes, your Logical Volume’s usable size can become much less if mirrored. Choose the parameters that you want and hit OK.
That’s it! You can now make use of your new combined space and not have to worry about finding things on different drives.
LVM is a great way to combine all of your hard drives into one seamless working volume. It brings many practical features to your computer so that you can get more work done, and spend less time worrying. It’s also a great way to get the same “Drive Extender” feature that Windows Home Server uses. Plus with mirroring, you can also be sure that if one hard drive fails, you still have all your data. How cool is that?
What do you think of LVM? Are you possibly going to use it in the future? Do you have any home servers that are using LVM? Let us know in the comments!
Image Credit: Shutterstock
More articles about: