[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NFS tries following remote symlinks as if local!



Adam,

Perhaps a hard link would work in the manner you're looking for?

It does appear that there is no way to disable this behavior (as applied
to symlinks). Note that NFS servers will return the pathname of a
symbolic link, regardless of whether it is absolute or relative (the
server really doesn't care... just happens that one answer starts with a
"/").

You might want to pick up the O'Reilly NFS book (Managing NFS and NIS).
It's kinda handy for the little NFS oddities like this.

Don't be too hard on people who seem to underestimate your knowledge of
a subject... often it's easiest to start from a certain point in an
explanation to be certain everyone's on the same page... That's also
very handy for others following along in the list or in the archives of
a list.


--Rich

Adam Warner wrote:
> 
> On Tue, 2001-11-20 at 14:35, nate wrote:
> > Adam Warner said:
> > > Hi all,
> > >
> > > I've come across this crazy problem and I hope someone knows what's
> > > going on.
> > >
> > > I am using kernel-level NFS. Debian unstable. 2.4.14. I have
> > > exported /
> > >
> > > I can mount the remote filesystem on my client machine no problem.
> > > But if I try to change to a remote symlinked directory I get, for
> > > example:
> >
> > this is normal and expected behavior. all a symlink is is a pointer.
> > it points to a file. even if a file doesn't exist.
> 
> Nate as you can gather from my follow up post I have a higher level of
> understanding than that.
> 
> The remote symlink points to the correct location on the remote system.
> Having always used Samba for remote file accesses (so I could also
> access the files using a Windows machine) I expected NFS to follow
> remote symlinks on the remote filesystem (just like when I navigate a
> file system when ssh'ed into a remote box). I've learned an important
> lesson.
> 
> Since I primarily use symlinks to hide the underlying file system layout
> I just expected the symlinks to continue to act transparently.
> 
> Though I can see the point of Dave's "Good Thing" response.
> 
> If I am backing up the files on my remote computer I will have to be
> careful to use the -d option in cp. Otherwise I will also back up parts
> of my local computer as the remote symlinks translate to local paths on
> my computer.
> 
> I just tried converting my absolute symlinks to relative ones. But it
> still doesn't work (because it appears I don't have the ability to
> descend into mounts). Here's the scenario:
> 
> I'm in the NFS mount point on my local computer. I "ls -l" and see this
> particular link.
> 
> home -> mnt/data/home
> 
> So if I cd to home I should continue down the remote filesystem. Note
> that there is no slash (/) before mnt. This is a relative path.
> 
> But it doesn't happen. Instead the mnt/data directory is empty. It
> appears NFS doesn't descend into mount points either. I've tried adding
> the "nohide" option to disable this but it made no difference.
> 
> Regards,
> Adam
> 
 

_________________________________________________________
                         
Rich Puhek               
ETN Systems Inc.         
_________________________________________________________



Reply to: