1820390 Members
3454 Online
109623 Solutions
New Discussion юеВ

NFS exporting symlinks.

 
rayvd
Advisor

NFS exporting symlinks.

I have a directory /export/nike1 and have a symbolic link /nike1 -> /export/nike1.

In /etc/exports I am listing /nike1.

When I do a showmount -e or exportfs however, it appears that instead of showing /nike1 as exported, the full path is exported -- /export/nike1.

Since I have limited disk space on my / filesystem, is my only option to resize my logical volumes and create a /nike1 filesystem and pull it off of the /export filesystem?

Or is there some way to make the NFS daemon not expand out my symlink to the full "real" path?

TIA.

PS: This is on B.11.11.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: NFS exporting symlinks.

Shalom,

I've just looked at a Linux man page for exports. It would appear this is not permitted.

http://mail-index.netbsd.org/tech-kern/1995/05/28/0000.html

The links below deal with Linux that uses NFS v4. You need HP-UX 11.23 to get NFS v4
http://www.tldp.org/HOWTO/Network-Install-HOWTO-8.html


Samba Servers follow sym links
http://docs.hp.com/en/B8725-90118/ch12s02.html

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: NFS exporting symlinks.

Why do you care what you export as long as the clients know what the path is?

>Or is there some way to make the NFS daemon not expand out my symlink to the full "real" path?

This has nothing to do with NFS but the exportfs command getting the real directory path.
rayvd
Advisor

Re: NFS exporting symlinks.

Widespread use of the automounter here.

NFS exports are expected to be accessible from a remote machine as follows:

/net/machinename/machinename1
/net/machinename/machinename2
/net/machinename/machinename3

etc. A user's home directory field in their gecos will include a path like the above allowing it to be mounted from any automount enabled machine.

Obviously this won't work if we have to access the above as follows:

/net/machinename/export/machinename1

simply because on 'machinename' /machinename1 is actually a symlink to /export/machinename1 ...

Anyways, I'll just redo my filesystems to work around this.

Thanks.
anandganjihal
Advisor

Re: NFS exporting symlinks.

>> Or is there some way to make the NFS daemon not expand out my symlink to the full "real" path?

NO, this is nothing to do with NFS mountd daemon as everything is in physical filesystems lookup algo.

Just for info: showmount or exportfs intern contacts local mountd daemon to retrive the exported directory list which user entered in /etc/exports file.

You can use either /nike1 or /export/nike1 while mounting on NFS client side, for example:

mount server:/nike1 /mnt

or

mount server:/export/nike1 /mnt
Peter Nikitka
Honored Contributor

Re: NFS exporting symlinks.

Hi,

regarding
>>
Widespread use of the automounter here.
<<
If you use the default map '-hosts', you have just to do it the other way round:
Mount the lvol under /nike1 and create - if required for compatibility issues - a symlink:
/exports/nike1 -> ../nike1

If you use a home grown NIS-map for these filesystem, just add a non-default entry for them; something like

machinename \
/machinename1 &:/export/machinename1 \
/machinename2 &:/export/machinename2
* &:/nike1/& (or whatever)

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"