[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

mknfsmnt Command

Purpose

Mounts a directory from an NFS server.

Syntax

/usr/sbin/mknfsmnt -f PathName -d RemoteDirectory -h RemoteHost [ -t { rw | ro } ] [ -m MountTypeName ] [ -w { fg | bg } ] [-X | -x ] [ -S | -H ] [ -Y | -y ] [-Z | -z ] [ -e | -E ] [ -a | -A ] [ -j | [ -J ] [ -q | [ -Q ] [ -g | [ -G ] [ -s | -n ] [ -I | -B | -N ] [ -r TimesToRetry ] [ -R NumRetrans ] [ -b ReadBufferSize ] [ -c WriteBufferSize ] [ -o TimeOut ] [ -P PortNumber ] [ -u AcRegMin ] [ -U AcRegMax ] [ -v AcDirMin ] [ -V AcDirMax ] [ -T AcTimeOut ] [ -p NumBiods ] [ -K { any | 2 | 3 } ] [ -k { any | tcp | udp } ]

Description

The mknfsmnt command constructs an entry that will be appended to the /etc/filesystems file, thus making a file system available for mounting. If the mount is to be permanent, this entry will remain. If the mount is temporary, the flags will be used directly for the mount command. If the mount is soft, the system returns an error if the server does not respond. If the mount is hard, the client continues trying until the server responds. The hard mount is the default.

Flags

-A The /etc/filesystems entry for this file system will specify that it should be automatically mounted at system restart.
-a The /etc/filesystems entry for this file system will specify that it should not be automatically mounted at system restart. This is the default.
-B Adds an entry to the /etc/filesystems file and attempts to mount the file system. This flag is the default.
-b ReadBufferSize Indicates the size of the read buffer in bytes specified by the ReadBufferSize variable.
-c WriteBufferSize Indicates the size of the write buffer in bytes specified by the WriteBufferSize variable.
-d RemoteDirectory Specifies the directory that is mounted on the path name specified.
-E Allows keyboard interrupts on hard mounts.
-e Prevents keyboard interrupts on hard mounts. This is the default.
-f PathName Specifies the mount point for the remote directory.
-G Directs any file or directory created on the file system to inherit the group ID of the parent directory.
-g Does not direct new files or directories created on the file system to inherit the group ID of the parent directory. This is the default.
-H Creates a hard mount, which causes the client to continue retrying until the server responds. This is the default.
-h RemoteHost Specifies the NFS server that is exporting the directory.
-I Causes an entry to be added to the /etc/filesystems file. The directory is not mounted.
-J Indicates that acls are used on this mount.
-j Indicates that acls are not used on this mount. This is the default.
-K Specifies the NFS version used for this NFS mount. This flag only applies to AIX Version 4.2.1 or later. Options are:
any Uses the mount command to determine the correct match, first attempting the highest NFS version available.
2 Specifies NFS Version 2.
3 Specifies NFS Version 3.
-k Specifies the transport protocol used for the mount. This flag only applies to AIX Version 4.2.1 or later. Options are:
any Uses the mount command to select the protocol to use. TCP protocol is the preferred protocol.
tcp Specifies the TCP protocol.
udp Specifies the UDP protocol.
-m MountTypeName Specifies the type of file system to mount. File system types are specified in the /etc/filesystems file with the type variables. When the mount -t MountTypeName command is issued, all of the currently unmounted file systems with a type equal to the MountTypeName are mounted.
-N Mounts the directory with the options specified but does not modify the /etc/filesystems file.
-n Instructs the mount not to use a more secure protocol. This flag is the default.
-o TimeOut Indicates the length of the NFS timeout in tenths of a second as specified by the TimeOut variable.
-P PortNumber Indicates the Internet Protocol port number for the server.
-p NumBiods Specifies the number of biod daemons that are allowed to work on a particular file system. The biod daemons handle client requests and the default number of daemons is 6 (six).
-Q Requests that no posix pathconf information be exchanged and made available on an NFS Version 2 mount. Requires a mount Version 2 rpc.mountd at the NFS server.
-q Specifies that no posix pathconf information is exchanged if mounted as an NFS Version 2 mount. This is the default.
-r TimesToRetry Indicates the number of times to retry a mount. The default is 1000.
-R NumRetrans Specifies, for a soft mount, the number of times that a request is to be transmitted if it is not acknowledged by the server. If the request goes unacknowledged after NumRetrans transmissions, the client gives up on the request. If this flag is not specified, the default value of 3 is used.
-S Creates a soft mount, which means the system returns an error if the server does not respond.
-s Instructs the mount to use a more secure protocol.
-T AcTimeOut Sets minimum and maximum times allowed for regular files and directories to the number of seconds specified by the Actimeo variable. If this flag is specified, the other cached attribute times are overridden.
-t Type Specifies that the directory is either read-write or read-only.
rw Mounts the directory read-write. This type is the default for the system.
ro Mounts the directory read-only.
-U AcRegMax Holds cached attributes for no more than the number of seconds specified by the AcRegMax variable after file modification.
-u AcRegMin Holds cached attributes for at least the number of seconds specified by the AcRegMin variable after file modification.
-V AcDirMax Holds cached attributes for no more than the number of seconds specified by the AcDirMax variable after directory update.
-v AcDirMin Holds cached attributes for at least the number of seconds specified by the AcDirMin variable after directory update.
-w Location Indicates where the mount should be attempted. The Location variable can have one of the following values:
fg Attempts the mount in the foreground. This is the default value.
bg Attempts the mount in the background. If background is specified and the attempt to mount the directory fails, the mount will be retried in the background.
-x Specifies that the server does not support long device numbers.

Use this flag when mounting from an NFS server that does not correctly handle device numbers that are 32 bits long. This situation occurs when running an AIX 3.2 diskless client from a third-party server that supports only device numbers that are 16 bits long.

-X Specifies that the server does support long device numbers. This is the default.
-y Indicates that the execution of suid and sgid programs is not allowed in this file system.
-Y Indicates that the execution of suid and sgid programs are allowed in this file system. This is the default.
-z Indicates that device access through this mount is not allowed; that is, the device cannot be opened on this mount point.
-Z Indicates that device access through this mount is allowed. This is the default.

Example

To add the mount of a remote directory, enter:

mknfsmnt -f /usr/share/man -d /usr/share/man -h host1

In this example, the mknfsmnt command mounts the remote directory /usr/share/man on the /usr/share/man directory that resides on host1.

Files

/etc/filesystems Lists the remote file systems to be mounted during the system restart.

Related Information

The chnfsmnt command, mount command, rmnfsmnt command.

How to Mount a NFS File System Explicitly in AIX Version 4.3 System Management Guide: Communications and Networks.

Network File System (NFS) Overview for System Management in AIX Version 4.3 System Management Guide: Communications and Networks.

List of NFS Commands.


[ Previous | Next | Contents | Glossary | Home | Search ]