LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Merging directories transparently

[ILUG] Merging directories transparently

David Neary bolsh at gimp.org
Mon Mar 25 13:26:14 GMT 2002


kevin lyda wrote:
> On Mon, Mar 25, 2002 at 12:00:10PM +0000, Brian Foster wrote:
> >  AFAIK, this is correct.  I myself have doubts it ever will be
> >  possible, as there may be some hairy issues to resolve --- but
> >  I long ago stopped trying to guess what new "madness"  ;-)
> >  Linux kernel developers would try ....
> 
> *bsd systems have had this for years.  it's called a union mount.
> man mount_union.  in addition there's a union option to mount.
> 
> >  some of the problems include, but may not be limited to:
> > 
> >   ( we want to, in effect, merge the namespaces of "directory"
> >    FULL and "directory" ROOM, nominally on different FS/volumes. )
> > 
> >  1. both dirs contain a file called A.  what happens?
> 
> the one on top is seen.
> 
> >  2. where are new files which are created written (i.e., which FS)?
> 
> on the top directory.
> 
> >  3. naïvely, the st_dev --- see stat(2) --- will differ from file
> >     to file as the merged directory is scanned.  albeit this can
> >     happen anyways (mount points), it's often(?) not handled too
> >     well by programs which care.
> 
> not sure.  i'll play later and see.
> 
> the example from the man page is this:
> 
>     mount -t cd9660 -o ro /dev/cd0a /usr/src
>     mount -t union /var/obj /usr/src
> 
> all changes in /usr/src end up in /var/obj.

I would have thought that it would go the other way (that the
first directory gets priority). I suppose it's pretty arbitrary,
though.

The reason I wanted to do it is because there were two 
partitions with stuff which is basically the same, but can't be 
put in one place because neither partition is big enough to 
hold both directories (partition management is something I'm not 
too confident with yet - ext2resize just sounds like it invites 
data loss). I shouldn't really have gotten into the situation, 
but one of the partitions in question is a smallish hard-drive, 
which I thought would be sufficient, and turned out not to be. I 
guess I need to rethink how I use my hard-disk space.

Thanks for all the help & info,
Dave.

-- 
       David Neary,
    Marseille, France
  E-Mail: bolsh at gimp.org




More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell