Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In case of unix/linux, is there a way to create union of two directories without copying or linking manually everything to a single directory?

share|improve this question

2 Answers 2

up vote 14 down vote accepted

One option is to use unionfs

Unionfs: A Stackable Unification File System

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. Unionfs allows any mix of read-only and read-write branches, as well as insertion and deletion of branches anywhere in the fan-out.

Or another similar option aufs.

share|improve this answer
1  
Your answer seems much better ! –  Antoine Benkemoun Jun 5 '09 at 9:28
    
Having used unionfs to create a read-only filesystem with a read-write RAM FS on top of it, I can say that it's very easy to set up and works with little overhead. –  andrewd18 Jun 5 '09 at 13:01

mhddfs is great for making a heap of drives that are transparently linked. It takes some /etc/fstab fiddling, but the solution works great for me

http://blog.mindlesstechie.net/2009/01/19/combine-your-partition-space-with-mhddfs/

share|improve this answer

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.