Advertising NFS exports for Virtual Volumes

File Service Administration Guide for Hitachi NAS Platform

Version
14.9.x
Audience
anonymous
Part Number
MK-92HNAS006-31

This feature enables or disables the reporting of 'fake' NFS exports at the roots of virtual volumes.

A file system can contain NFS exports at the root of the file system, for example, /home, and also virtual volumes for users' home directories, for example, /fred and /joe. When the automounter on an NFS client mounts one of these home directories, it sends a request to the server to obtain the list of exports. This is the same request that's used by the showmount -e command. On receiving this list, it selects the most suitable export to mount.

If, for example, the automounter has been told to mount /home/fred but the only suitable export it finds is /home, it first mounts /home, then changes directory to /fred. Although this is fine for general file system operation, and indeed many mounts are created this way, it does mean that quota information may not be returned correctly. The reason for this is that because the client has mounted the export /home, the free space that's reported for the mount is that of the entire file system, not of the virtual volume /fred.

In order to enable the server to report the correct quota information for the mount, the client must mount /home/fred directly, rather than mounting /home and then changing directory to /fred. An obvious way to achieve this is to add an export /home/fred. However, having to manually add an export at the root of every virtual volume is time consuming.

Therefore, the server has the facility to report a 'fake' NFS export at the root of each virtual volume. In the scenario above, with a single export /home at the root of the file system, the server reports the exports /home, /home/fred and /home/joe. On receiving this list, the client now sees that the most suitable export is /home/fred, so it mounts that path directly, therefore ensuring that the correct quota information is returned to the user fred.

Take the following information into account when using this feature:

  • If UDP is used to transport MOUNT requests, only the first 64KiB of NFS export information is returned. So, TCP is recommended to ensure the complete list of NFS exports is always returned.
  • The server returns a maximum of 1000 mounts in response to the showmount -d command.
  • The Linux autofs4 client mounts all available exports, using a separate socket for each. So, if this feature causes a large number of exports to be advertised, Linux clients can end up with a large number of mounts. This can cause port exhaustion and can cause Linux clients to run very slowly.

For further information, see the nfs-export-advertise-for-virtual-volumes CLI command man page. This command also refreshes the list of exports manually and configures the interval at which automatic refreshes of the list occur. The list is always refreshed immediately when an export or virtual volume is added or removed, but it is also refreshed in the background at regular intervals to ensure other changes, such as directory renames, are reflected in the export list.