Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mntctl

mount

umount

uvmount

master

mount

umount

vmount

Purpose

     Mounts a directory or a regular file.

Syntax

     #include <sys/vmount.h>

     int vmount (path, stubpath, mflag, type, info, size)
     char *path,  *stubpath;
     int mflag;
     unsigned int type;
     unsigned long *info;
     int size;

Description

     The vmount system call provides, in addition to the func-
     tion of  the mount  system call,  the following  types of
     mounts:

     o   Local file or directory over local file or directory

     o   Local file or directory over remote file or directory

     o   Remote file or directory over local file or directory

     o   Remote file  or directory over remote  file or direc-
         tory.

     A directory can  only be mounted over a  directory, and a
     file can only be mounted over a file.

     A mount to a directory or  file may be issued if the user
     has:

     o   Search permission to the directory or file to mount

     o   Search and write permission  to the directory or file
         to mount over.

     The vmount system call mounts the file or directory iden-
     tified by  the path  parameter on  the file  or directory
     identified  by  the  stubpath parameter.   The  path  and
     stubpath parameters are  both pointers to null-terminated
     path names.  For  the mntctl system call to  be useful in
     reporting current virtual mounts, these paths should both
     be absolute  path names, beginning at  the root directory
     with a / (slash).

     The  type parameter  identifies the  type of  file system
     that  is  being mounted  with  the  path parameter.   The
     setting  of this  parameter also  determines whether  the

     info and size  parameters are used or  ignored.  The fol-
     lowing values are permitted for type:

     MNT_AIX   Indicates that path  identifies a local entity,
               and the  system can  determine the type  of the
               entity  by examining  it.  For  this type,  the
               info  and size  parameters are  ignored by  the
               system call.

               When mounting any local device, file, or direc-
               tory, specify this value.

     MNT_DS    Indicates that  path identifies an entity  in a
               remote node.  For this type, info points to the
               node  ID  of  the  remote  node,  and  size  is
               sizeof(long).

     The  mflag parameter  defines various  characteristics of
     the object to be mounted.  Possible values are:

     MNT_READONLY    Indicates that  the object  is read-only,
                     and write access is not allowed.  If this
                     value is  not specified, writing  is per-
                     mitted   according  to   individual  file
                     accessibility.

     MNT_REMOVABLE   Indicates that the  object is a removable
                     file  system.   Whenever   there  are  no
                     active references to files or directories
                     on the file  system, the operating system
                     forgets the content  and structure of the
                     file  system.  The  user  can remove  the
                     medium  and replace  it with  a different
                     file  system.  All  future references  to
                     stubpath will refer to the file system on
                     the new medium.

Return Value

     Upon  successful  completion,   the  vmount  system  call
     returns a value of 0.  If the vmount system call fails, a
     value of -1 is returned, and errno is set to indicate the
     error.

Diagnostics

     The vmount system call fails and the file or directory is
     not mounted if one or more of the following are true:

     EBUSY         stubpath   is  currently   busy.   Possible
                   causes include:

                   o   The kernel's mount table is full.
                   o   The path  parameter indicates  a device
                       that is currently mounted.

     EBUSY         The special file to  be mounted, defined by
                   the  path parameter,  is  already open  for
                   writing.

     ENOTBLK       The  object to  be mounted  is not  a file,
                   directory, or device.

     EFAULT        The  info,  stubpath,   or  path  parameter
                   &pointsout..

     E2BIG         The number of characters in path is greater
                   than MAXPATH.

     EPERM         This  process  is  not  the  owner  of  the
                   stubpath directory.

     EPERM         This process does not have write permission
                   on the parent directory of stubpath.

     EPERM         This  process does  not  have an  effective
                   user ID  of superuser and is  attempting to
                   mount a device.

     ENOTDIR       A  device  is  being mounted  over  a  non-
                   directory or over a remote directory.

     ENOTDIR       A  mount  of  a   remote  device  has  been
                   attempted.

     ENOTDIR       A  component of  the path  prefix is  not a
                   directory.

     ENOTDIR       stubfile  and path  are not  both files  or
                   both directories.

     EINVAL        For a remote mount,  the info parameter did
                   not point to a valid node ID.

     EINVAL        A remote  mount is requested,  but stubpath
                   is not  a full  path name beginning  with /
                   (slash).

     EINVAL        type is not a recognized file system type.

     EINVAL        path  indicates  a  device  that  does  not
                   contain a recognizable file system.

     EINVAL        A  type of  MNT_DS was  specified, but  the
                   local node ID was specified in info.

     EINVAL        A remote  mount is  requested, but  path is
                   not local to the server.

     EINVAL        path  indicates a  device  that contains  a
                   corrupted file system.

     ESTALE        The process's root  or current directory is
                   located in  a virtual file system  that has
                   been unmounted.

     If  Distributed Services  is  installed  on your  system,
     vmount can also fail if one  or more of the following are
     true:

     EDIST         The   server   has  blocked   new   inbound
                   requests.

     EDIST         Outbound requests are currently blocked.

     EDIST         The server has a  release level of Distrib-
                   uted Services that  cannot communicate with
                   this node.

     EAGAIN        The  server  is  too  busy  to  accept  the
                   request.

     ESTALE        The file  descriptor for a remote  file has
                   become obsolete.

     EPERM         The translate tables of  the server did not
                   contain any entry  for either the effective
                   user  ID  or  effective  group  ID  of  the
                   calling process.

     ENODEV        The named file is  a remote file located on
                   a  device that  has been  unmounted at  the
                   server.

     ENOMEM        Either  this node  or the  server does  not
                   have enough memory available to service the
                   request.

     ENOCONNECT    An attempt to establish  a new network con-
                   nection with a remote node failed.

     EBADCONNECT   An attempt to use  an existing network con-
                   nection with a remote node failed.

Related Information

     In this  book:  "mntctl," "mount,"   "umount," "uvmount,"
     and  "master."

     The  mount and  umount commands  in AIX  Operating System
     Commands Reference.

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