Establishing predefined NFS mounts

You can establish predefined NFS mounts using the one of the following procedures.

Note: Define the bg (background) and intr (interruptible) options in the /etc/filesystems file when establishing a predefined mount that is mounted during system startup. Mounts that are noninterruptible and running in the foreground can hang the client if the network or server is down when the client system starts up. If a client cannot access the network or server, the user must start the machine again in maintenance mode and edit the appropriate mount requests.
  • To establish predefined mounts through SMIT:
    1. Type:
      smit mknfsmnt
    2. Specify values in this screen for each mount you want to predefine. Specify a value for each required field (those marked with an asterisk (*) in the left margin). Also specify values for the other fields or accept their default values.
      This method creates an entry in the /etc/filesystems file for the desired mount and attempts the mount.
  • To establish the NFS default mounts by editing the /etc/filesystems file:
    1. Open the /etc/filesystems file with a text editor.
    2. Add entries for each of the remote file systems to be mounted when the system is started. For example:
      /home/jdoe:
      dev = /home/jdoe
      mount = false
      vfs = nfs
      nodename = mach2
      options = ro,soft
      type = nfs_mount

      This stanza directs the system to mount the /home/jdoe remote directory over the local mount point of the same name. The file system is mounted as read-only (ro). Because it is also mounted as soft, an error is returned in the event the server does not respond. By specifying the type parameter as nfs_mount, the system attempts to mount the /home/jdoe file (along with any other file systems that are specified in the type = nfs_mount group) when the mount -t nfs_mount command is issued.

      The example stanza below directs the system to mount the /usr/games file system at system startup time. If the mount fails, the system continues to attempt to mount in the background.

      /usr/games:
      dev = /usr/games
      mount = true
      vfs = nfs
      nodename = gameserver
      options = ro,soft,bg
      type = nfs_mount

      The following parameters are required for stanzas pertaining to NFS mounts:

      Item Description
      dev=filesystem_name Specifies the path name of the remote file system being mounted.
      mount=[true|false] If true the NFS file system is mounted when the system boots. If false, the NFS file system is not be mounted when the system boots.
      nodename=hostname Specifies the host machine on which the remote file system resides.
      vfs=nfs Specifies that the virtual file system being mounted is an NFS file system.

      The following parameters are optional for stanzas pertaining to NFS mounts:

      Item Description
      type=type_name Defines the file system being mounted as part of the type_name mount group. This parameter is used with the mount -t command, which mounts groups of specified file systems at the same time.
      options=options Specifies one or more of the following options parameters:
      biods=N
      Specifies the maximum number of biod daemons to use. The default is seven for NFS version 2, and four for NFS version 3 and version 4.
      bg
      Specifies to try the mount again in the background if the first mount attempt fails.
       
      fg
      Specifies to try the mount again in the foreground if the first mount attempt fails.
      noacl
      Disables, for this mount only, the Access Control List (ACL) support provided by the NFS journaled file system.

      When used between two systems, NFS supports access control lists. If the noacl option is used when mounting a file system, NFS does not use ACLs. The effect of the noacl option equals what happens when an NFS client on a system mounts from an NFS server that does not support ACLs.

      For more information about ACLs, refer to NFS Access Control Lists support.

       
      retry=n
      Sets the number of times to try the mount.
      rsize=n
      Sets the read buffer size to the number of bytes specified by n.
      wsize=n
      Sets the write buffer size to the number of bytes specified by n.
       
      timeo=n
      Sets the NFS time out to the tenths of a second specified by n. Use this variable to avoid situations that can occur in networks where the server load can cause inadequate response time.
      retrans=n
      Sets the number of NFS retransmissions to the number specified by n.
      port=n
      Sets the server port to the number specified by n.
      soft
      Returns an error if the server does not respond.
       
      hard
      Continues to try the request until the server responds.
      Note: When you specify a hard mount, it is possible that the process can hang while waiting for a response. To be able to interrupt the process and end it from the keyboard, use the intr variable in the mount variables.
      intr
      Allows keyboard interrupts on hard mounts.
      ro
      Sets the read-only variable.
       
      rw
      Sets the read-write variable. Use the hard variable along with this variable to avoid error conditions that can conflict with applications if a soft mount is attempted as read-write. See NFS troubleshooting for information on hard- and soft-mounted problems.
      secure
      Specifies to use a more secure protocol for NFS transactions.
      sec
      The sec option specifies the security flavor list for the NFS mount. The available flavors are des, unix, sys, krb5, krb5i, and krb5p. This option only applies to AIX 5.3 or later.
      actimeo=n
      Extends flush time by n seconds for both regular files and directories.
      Note: The attribute cache retains file attributes on the client. Attributes for a file are assigned a time to be erased. If the file is modified before the flush time, then the flush time is extended by the time since the previous modification (under the assumption that recently changed files are likely to change again soon). There are minimum and maximum flush time extensions for regular files and for directories.
      vers
      Specifies NFS version. The default is the version of NFS protocol used between the client and server and is the highest one available on both systems. If the NFS server does not support NFS Version 3, the NFS mount will use NFS Version 2. Use the vers option to select the NFS version. By default, the NFS mount will never use NFS Version 4 unless specified.
       
      acregmin=n
      Holds cached attributes for at least n seconds after file modification.
      acregmax=n
      Holds cached attributes for no more than n seconds after file modification.
      acdirmin=n
      Holds cached attributes for at least n seconds after directory update.
      acdirmax=n
      Holds cached attributes for no more than n seconds after directory update.
       
      cio
      Specifies the file system to be mounted for concurrent readers and writers. I/O on files in this file system will behave as if they had been opened with O_CIO specified in the open() system call. Using this option will prevent access in any manner other than CIO. It is impossible to use cached I/O on a file system mounted with the cio option. This means that mapping commands such as mmap() and shmat() will fail with EINVAL when used on any file in a file system mounted with the cio option. One side effect of this is that it is impossible to run binaries out of a cio-mounted file system, since the loader may use mmap().
      dio
      Specifies that I/O on the file system will behave as if all the files had been opened with O_DIRECT specified in the open() system call.
      Note: Using the -odio or -ocio flags can help performance on certain workloads, but users should be aware that using these flags will prevent file caching for these file systems. Because readahead is disabled for these file systems, this may decrease performance for large sequential reads.
       
      maxpout=n
      Specifies the page-out level for files on this file system at which threads should be slept. If maxpout is specified, you must also specify minpout. This value must be nonnegative and greater than minpout. The default is the kernel maxpout level.
      minpout=n
      Specifies the page-out level for files on this file system at which threads should be readied. If minpout is specified, you must also specify maxpout. This value must be nonnegative. The default is the kernel minpout level.
      rbr
      Uses the release-behind-when-reading capability. When sequential reading of a file in this file system is detected, the real memory pages used by the file are released once the pages are copied to internal buffers.
       
      Note: If you do not set the following options, the kernel automatically sets them to these default values:
      fg
      retry=10000
      rsize=8192
      wsize=8192
      timeo=7
      retrans=5
      port=NFS_PORT
      hard
      secure=off
      acregmin=3
      acregmax=60
      acdirmin=30
      acdirmax=60
    3. Remove any directory entries that you do not want to mount automatically at system startup.
    4. Save and close the file.
    5. Run the mount -a command to mount all the directories specified in the /etc/filesystems file.