Pinterest Stumbleupon Whatsapp
Ads by Google

combine hard drives into oneIf you tend to use up a lot of storage, you’ll probably have had some storage problems. You might still have a lot of empty hard drives lying around, but they were more than likely all low-capacity drives, so splitting up all your data across these drives would be confusing in the long run.

However, there’s an easy way to combine all of those hard drives into one seamless storage container with a Linux technology called LVM, which is short for “Logical Volume Management”.

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

combine hard drives into one

Ads by Google

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 GParted - The Ultimate In Partitioning Software GParted - The Ultimate In Partitioning Software Read More or Palimpsest to help you out.

combine hard drives

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.

combine hard drives

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.

combine hard drives into one

That’s it! You can now make use of your new combined space and not have to worry about finding things on different drives.

Conclusion

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

  1. radu
    March 11, 2016 at 12:52 am

    Hello. I can see this subject is old, but I want to ask something. I want to make and store a huge 10tb file. Is it possible to "combine" 5-6 LAN-NAS hard disks to do it? Honnestly, i could not find anyware a HDD this big, so i will need to combine more than one. And because I use a laptop, I want to combine them all at one router thru LAN cable.
    But it will be still possible.

  2. Jake
    April 21, 2011 at 10:59 am

    Could this be used with a USB hub to turn all my spare thumb drives (maybe 6) into a single largish drive?

    Jake

    • Danny Stieben
      April 21, 2011 at 1:16 pm

      Sure! Just make sure that you ignore the "removable media" nature of flash drives and keep them plugged into the USB hub at all times while the computer is on. Otherwise you could unnecessarily mess around with your LVM system and cause it to fail.

  3. analogtek
    April 20, 2011 at 7:07 am

    I got 7 junk drives collecting dust. they go from a 2g (remember when that was huge) to 160g ata 133. Will have to get brave my next 3-day weekend. Not sure if power supply will hold. Or I could hard/hack a old at power supply as a external power supply. it will be a experiment in concept.

    • Danny Stieben
      April 21, 2011 at 1:15 pm

      Go for it! If it works, you'll have plenty of space to use.

  4. analogtek
    April 19, 2011 at 7:04 am

    I am just a greeny. But this trick looks/seems like a type of raid.

    • Anonymous
      April 19, 2011 at 4:57 pm

      it is. its a pseudo-jbod software raid basically

      • Zhangjing Su
        April 21, 2011 at 9:28 am

        In a sense yes.
        But just to be clear, apart form concatenating and/or striping physical volumes (individual hard disks) like basic raid 0 or jbod into a volume group (resultant raid/jbod volume), it also allows logical volumes (individual partitions on raid/jbod volume) to be non-continuous with respect to the volume group. Sadly, this also means that the volume group does not have a traditional partition table so you cannot use tradition partitioning tools without LVM support like fdisk to manage it. The upshot is that since the logical volumes(partitions) no longer need to be contiguous, you can resize the logical volume(partition) without affecting the other logical volumes residing on the same volume group as long as you have space to expand.
        I should add that because of the non-contiguous and snapshot capabilities, it's actually useful to use lvm on top of a single physical harddisk.

        • Danny Stieben
          April 21, 2011 at 1:14 pm

          That may be a reason why Fedora installs by default with a LVM partition layout, even for a single hard drive.

  5. Gilberto J Perera
    April 19, 2011 at 2:50 am

    Can we bring this to Vail? This is one of the features (Drive Extender) that will be surely missed in the WHS 2. When Microsoft stops supporting WHS 1 I may need to look into a tool like this to bring all of those terabytes of data together. Great find.

    • Danny Stieben
      April 20, 2011 at 1:52 am

      Exactly. It's possible in Linux, so why is Microsoft giving up? I'm not sure what the answer is, but if they refuse to make it work, there's always the alternative.

  6. Anonymous
    April 19, 2011 at 1:25 am

    The question i have is this. When you set up the lvm to span all the disks, what happens if a drive fails? i know there is no redundancy, but if i remember right JBOD array's you just loose all your data. with this is it the same or do you loose whatever data was on the failing disk?

    • Danny Stieben
      April 20, 2011 at 1:50 am

      You can use the mirroring feature, so when a drive fails, the other one (or another one for multiple drives) will still have the data. Just remember that it will limit the size of your LVM to the same size as your smallest hard drive.

      • Anonymous
        April 20, 2011 at 2:55 am

        sweet. thanks good sir. also now that downloadsquad is basically dead, i will have to flock to makeuseof...i will treat her good and have her home by 12 i promise.

  7. Miggs
    April 18, 2011 at 5:55 pm

    Glad to see Linux stuff on MakeUseOf. The pool Linux vs OS X has shown very clearly the usage share between these two. And I strongly believe the real worldwide share is somewhat near. OS X gets so much attention from those big companies because they pay for it, but the large mases don't actually use it.

Leave a Reply

Your email address will not be published. Required fields are marked *