Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
1  
go for zfs on Linux. –  Nikhil Mulley Feb 28 '12 at 3:38
add comment

migrated from superuser.com Feb 27 '12 at 18:16

This question came from our site for computer enthusiasts and power users.

3 Answers

up vote 6 down vote accepted

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.

share|improve this answer
add comment

You may be interested in UnionFS. It may be simpler to setup on an existing system than an LVM.

From the UnionFS page, http://www.filesystems.org/project-unionfs.html :

This project builds a stackable unification file system, which can appear to merge the contents of several directories (branches), while keeping their physical content separate. Unionfs is useful for unified source tree management, merged contents of split CD-ROM, merged separate software package directories, data grids, and more.

I hope you find this helpful.

share|improve this answer
add comment

The LVM answer is a good one, but raid can do this as well, so adding another.
The linux software raid (mdadm) does allow adding disks to an array that's already created. When you do it will re-balance the data onto the new drive.
If youre not interested in redundancy, you can use raid-0 which simply stripes data evenly across all disks.
However raid-5 offers at least some redundancy without losing much storage (you sacrifice one disk's worth).

But with that said, raid works best when all the drives are the same size. If they arent the same size, portions of the drive will be unused as it'll only use as much as the smallest drive. If I recall correctly, LVM stiping does not have this issue as if the drives arent the same size, the extra space just wont be striped.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.