Linux – Mounting multiple devices at a single mount point on Linux

filesystemslinuxmountraid

Is there a way to mount multiple hard drives to a single mount point? Let's say I run out of space on /home and decide to add an extra hard drive to the computer. How do I scale the space on a mount point? If I use RAID, can I add drives on the fly to increase space as I run out of them? Is there an alternative to using RAID if I am not interested in maintaining a high level of redundancy?

Best Answer

You can use lvm for this. It was designed to separate physical drive from logical drive.

With lvm, you can :

  1. Add a fresh new physical drive to a pool (named Volume Group in LVM terminology)

    pvcreate /dev/sdb my_vg

  2. Extend space of a logical volume

    lvextend ...

  3. And finish with an online resize of your filesystem

    e2resize /mnt/my/path

But beware it's not a magic bullet. It's far more harder to reduce a filesystem, even with LVM.

Related Question