Can we mount multiple disks as one directory?

Solution 1:

mhddfs is exactly what you are looking for: http://romanrm.net/mhddfs

You can mount like this:

mhddfs /mnt/a/,/mnt/b/,/mnt/c/ /storeall/

where /mnt/a/, /mnt/b/, and /mnt/c/ are three different mount points which can be from three different hard drives. You can unmount like this:

fusermount -u /storeall

If one disk fails you only lose the files that was stored on that particular disk. If your data is important for you and you would like your data to survive a disk failure you should consider a RAID setup instead (search for mdadm).

edit: PS! The devices you mount can even have different filesystems!

Solution 2:

This isn't a filesystem problem, it is a partitioning problem.

What you want to do is remove the filesystems on these disks (backup any data that is already on them), then create a LVM volume set across all four disks. Then you can create a filesystem in that volume set, and mount that filesystem to a single place and fill it that way.

Be aware that there won't be any redundancy to this, and if you lose any of the four disks, you'll likely lose the data on ALL of them.


Solution 3:

Check out UnionFS , it might help you.