Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mount(2nfs) — Ultrix WS 2.0 VAX

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

gfsi(5)

mount(8nfs)

mount(2nfs)

NAME

mount, umount − mount or remove an NFS file system

SYNTAX

#include <sys/types.h> #include <sys/fs_types.h>
mount(special, name, rwflag, type, options) char *special, *name; int rwflag, type; char *options;

unmounted(dev) dev_t dev;

DESCRIPTION

The mount system call announces to the system that a remote NFS file system has been mounted on directory name.  References to file name refer to the root file on the newly mounted file system.  The remote file system identifier special is in the format:

host:pathname

The special argument is a pointer to a null-terminated string containing the path name of the file system being mounted. It is of the form, host:pathname. 

The name argument is a pointer to a null-terminated string containing the pathname of the root file on the newly mounted file system.  The name must already exist and must be a directory.  Its old contents are inaccessible while the file system is mounted. 

The rwflag argument is used to determine whether the file system can be written to; if it is 0, the file system is writable, if non-zero, the file system is write-protected. 

The type argument identifies the file system type that is being mounted.  The DEFINE statement for the nfs type is:

#define GT_NFS   0x04

The nfs file system type is defined in the <fs_types.h> file. 

The options argument specifies certain parameters that can be used to define how the file system is to be mounted.  The mount(8nfs) description lists the available NFS options.

 

The following structure is used by the nfs_mount user level routine as the fifth argument when making a mount() system call.

  struct nfs_gfs_mount {
         struct sockaddr_in addr;   /* File server address /*
         fhandle_t  fh;             /* File handle to be mounted /*
         int   flags;               /* Flags handler /*
         int   wsize;               /* Write size in bytes /*
         int   rsize;               /* Read size in bytes /*
         int   timeo;               /* Initial timeout in .1 secs. /*
         int   retrans;             /* Times to retry send /*
         char *hostname;            /* Server’s host name /*
         char *optstr;              /* Options string /*
int   gfs_flags;           /* GFS flags /*
         int   pg_thresh;           /* Page threshold for exec /*
    };

RETURN VALUE

The mount system call returns a value of 0 upon successful completion of a operation, −1 if the operation fails.  The mount operation fails under several different circumstances. Failure occurs when the remote file system is inaccessible and also when there are too many file systems mounted. In addition, the mount operation is unsuccessful when the directory name does not exist, or is already in use. 

The umount system call announces to the system that the remote file system mounted on directory name is no longer available.  The directory name reverts to its ordinary interpretation. 

The umount system call returns 0 if the dismount operation succeeds, −1 if it fails.  The file system dismount operation fails when the directory name is inaccessible or does not have a mounted file system.  The dismount operation is also unsuccessful when there are active files in the mounted file system. 

DIAGNOSTICS

[EPERM] The caller is not the superuser. 

[ENODEV] A component of special does not exist. 

[EINVAL] The pathname contains a character with the high-order bit set. 

[ENOTDIR] A component of name is not a directory. 

[EBUSY] Another process currently holds a reference to name. 

[ENAMETOOLONG]
A component of the pathname exceeded 255 characters, or the entire length of the pathname exceeded 1023 characters.

[ELOOP] Too many symbolic links were encountered in translating the pathname. 

[ENOENT] A component of name does not exist. 

[EMFILE] No space remains in the mount table. 

[EFAULT] The special or name points outside the process’s allocated address space space. 

[ESTALE] The fhandle given in the argument was invalid.  The file referred to by that file handle no longer exists or has been revoked. 

The umount call may fail with one of the following errors:

[EPERM] The caller is not the superuser. 

[EINVAL] The requested mounted-on directory is not in the mount table. 

[EBUSY] A process is holding a reference to a file located on the file system. 

[EIO] An I/O error occurred while writing cached file system information. 

SEE ALSO

gfsi(5), mount(8nfs)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026