Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

go for zfs on Linux. – Nikhil Mulley Feb 28 '12 at 3:38
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

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

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

You can use mhddfs instead lvm as if one disk is failed then only data on that disk will be lost. It runs on user space using fuse modules but I'm using it for very heavy load infrastructure

[root@storagenode1 ~]# df -hl
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdl2             259G  2.1G  244G   1% /
tmpfs                  48G     0   48G   0% /dev/shm
/dev/sdl1             485M   30M  430M   7% /boot
/dev/sda1              24T   23T  1.4T  95% /mnt/disk01
/dev/sdg1              24T   22T  2.6T  90% /mnt/disk02
/dev/sdf1              24T   22T  2.6T  90% /mnt/disk03
/dev/sdb1              24T   20T  4.5T  82% /mnt/disk04
/dev/sde1              39T   30T  8.3T  79% /mnt/disk07
/dev/sdh1              28T  6.6T   21T  24% /mnt/disk08
/dev/sdj1              39T   32T  6.5T  84% /mnt/disk09
/dev/sdi1              20T  792G   19T   5% /mnt/disk10
                      218T  153T   65T  71% /mnt/disk99

This is the main developer website, and here you can download packages for Centos6, as I'm doing

  1. yum install mhddfs
  2. create mount points for local disks as normal and mount them
  3. create anouther directory to hold all your disks, my case called disk99
  4. mount all disks into disk99 using mhddfs

vim /etc/fstab add this line

mhddfs#/mnt/disk01,/mnt/disk02,/mnt/disk03,/mnt/disk04,/mnt/disk07,/mnt/disk08,/mnt/disk09,/mnt/disk10          /mnt/disk99     fuse    defaults,allow_other,mlimit=10%,nonempty,logfile=/dev/null,loglevel=2   0       0

Warning: in my case with heavy load mhddfs was logfile size consuming and crashed the server many times, therefore I use /dev/null for logging. I couldn't make logrotate work with mhddfs because you need to remount when you change logfiles.

share|improve this answer

Your Answer


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.