Introducing Network File System Version 4 on HP-UX 11i v3
20
Server Support for Referrals
Server support for referrals is provided by the “refer” option of the share(1M) command. For
example the following share command exports the “/mnt” file system, which is referring to the “/tmp”
directory residing on the NFSv4 server whose IP address is 16.92.87.140.
# share –o refer=/tmp@16.92.87.140 /mnt
Syntax of share command
# share –o refer=<path>@<ipaddr> <dir>
Note:
1. The <dir> entry must be a file system partition or logical volume since clients recognize a
change in the file handle when using referrals.
2. The <ipaddr> entry must be an IP address as client referral requests are not able to use
hostname resolution mechanisms to resolve server hostnames.
Referrals can be defined with multiple referral hosts and multiple referral entries as:
# share –o refer=<path>@<ipaddr1>+<ipaddr2>+… <dir>
# share –o refer=<path1>@<ipaddr1>:<path2>@<ipaddr2> <dir>
The subsequent entries are used by the referral client when the previous entry fails to mount
successfully.
Client Support for Referrals
Mounting of the referral file system on client is triggered by the lookup (ls or cd command) of the
shared file system on the referred server. The following lists some important notes regarding the
referral mounted systems on the client that users should be aware about:
• Referral mounts and unmounts are automatic and transparent to the user.
• Referral mounted file systems will not show up in mount or bdf commands.
• nfsstat –m will show the mounted referral file systems.
• Only IP address may be used as the referral server since hostname resolution is not supported
during referral mounts.
• Client allows referral IP addresses from the same address family only (i.e. IPv4 or IPv6).
• Client supports nested referrals where a referred file system location has objects that are
referred to another remote server file system
• Client returns an error if it tries to directly mount to a referred location and the referred
location is referred to another server.
• Once the referral file system is mounted, it will remain mounted unless server does an unshare
or reshares the file system to another server or if it is unmounted explicitly.
• Resharing of the referral file system on the server is detected at the client when client updates
the directory containing the referral file system or when the directory cache expires. HP-UX
server will touch the parent directory when sharing a file system to indicate that the parent
directory is changed.
• Client automatically unmounts the previously mounted referral file system and mounts to the
new referral location when it detects a change to the referral location.