Just-in-time Symlinks

Michael Gerdts Michael.Gerdts at usa.alcatel.com
Mon Jun 18 12:15:35 GMT 2001


It sounds like you should be able to create a VFS module that does this.
You could then enable it on a share-by-share basis as well.

Mike

On Fri, Jun 15, 2001 at 01:31:28PM -0500, Michael H Buselli wrote:
> Hello,
> 
> I was wondering if any changes were made to the Samba source three years
> ago when the just-in-time symlinks discussion was on this list.  I
> looked at the code and the Samba documentation and I cannot see any
> changes.
> 
> This is part of one of the emails in that discussion.
> 
> On June 4, 1998 Albert Chin-A-Young wrote:
> > Ok, following discussions with Paul Epp <epp at clrtech.bc.ca>, there are
> > a total of three ways to solve this problem:
> >         1. Add the following options to smb.conf:
> >                 jit symlinks = yes/no
> >                 file symlinks = [pointer to file with REs]
> >                 directory symlinks = [pointer to file with REs]
> >            Then wrap calls to stat() accordingly so that symbolic
> >            links in a particular directory are treated as files
> >            or directories and force lstat() on them. The
> >            'jit symlinks' stands for 'just-in-time symlinks' and
> >            would enable this feature. This would be a general-
> >            purpose mechanism for anyone with trees of symbolic
> >            links.
> >         2. Move Samba to a Solaris 2.6 platform running the Solaris
> >            automounter. Due to the new browsability feature that
> >            exists in this automounter, Samba can walk the list of
> >            automounter keys without causing a mount storm because
> >            the automounter lies when stat() is called (so nothing
> >            is mounted). An added benefit to this is that we
> >            can point shares directly at the automounter namespace
> >            and get rid of our utility to create a tree of links
> >            from the automounter maps.
> >         3. Modify the Berkeley AMD automounter to lie about stat()
> >            as the Solaris 2.6 automounter does.
> > 
> > What do you all think? Paul is already coding up solution #1 and
> > will be done shortly. I have tested solution #2 and it works just
> > fine (though we're running AMD here).
> 
> I have the result of the code modifications by Paul Ebb to implement #1
> above, but those modifications were done to Samba version 1.9.18p10 and
> we would rather move on to 2.2.x and future releases.
> 
> To re-iterate the problem, we have the Berkeley AMD automounter mounting
> NFS shares that we then want to re-export with Samba.  We have the
> "disappearing mount points" problem that is all too well known when
> automounters are involved.  The just-in-time code wraps calls to
> sys_stat() within Samba and returns fake information instead of calling
> stat() if we are working on a symbolic link to prevent mount storms
> while programs peruse the browsing directories.
> 
> Jeremy Allison was interested in the code but had concerns about
> performance due to the extra overhead before making a stat() call.
> Nevertheless, we would still like to see some method of supporting our
> environment incorporated into the base Samba code.  A compile-time
> option is my suggestion, and this way the extra overhead would not be
> present to those that don't absolutely need it.
> 
> If anyone knows how to solve our problem without code modifications to
> the current Samba code, please let me know so we can avoid anything
> unnecessary.  If you want to read up on the discussion from three years
> ago, search for "just-in-time" on the samba-technical archives at
> http://marc.theaimsgroup.com/.  Thank you.
> 
> --
> Michael H. Buselli
> Senior Network Systems Specialist            Abbott Laboratories
> Email: busellim at pprd.abbott.com              D472/AP9A-L20
> Phone: 847-935-4624                          100 Abbott Park Road
> Fax: 847-935-0142                            Abbott Park, IL  60064-3500

-- 
Mike Gerdts                                              (919) 850-5284
Unix Systems Administrator               Michael.Gerdts at usa.alcatel.com




More information about the samba-technical mailing list