z/OS UNIX System Services File System Interface Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Mounting file systems

z/OS UNIX System Services File System Interface Reference
SA23-2285-00

Mountable file systems are subsets of the file hierarchy that are added and deleted by mount and unmount. Each has its own root and hierarchical directory structure. One such file system serves as the root of the whole file hierarchy, and mounts are done upon the directories of other mounted file systems.

A mount may be issued from the BPXPRMxx parmlib member that is used with the start of z/OS UNIX, by a user through ISHELL, by the TSO/E MOUNT command, by automount, or by a program using the mount() function. The latter function is restricted to users with appropriate privileges.

Following is the syntax of a MOUNT statement, showing the parameters that are important to this discussion:
MOUNT FILESYSTEM(file_system_name) or DDNAME(ddname)
      TYPE(file_system_type)
      MOUNTPOINT(pathname)
      MODE(READ | RDWR)
      PARM(parameter_string)
      SETUID | NOSETUID
where:
  • FILESYSTEM specifies a 1-to-44-character name, blank padded, by which this file system is to be known. It must be unique among previously mounted file systems. This is also used by some PFSs as an MVS™ data set name.
  • DDNAME specifies the ddname on an ALLOCATE that is issued from the OMVS cataloged procedure. This is an alternative to the FILESYSTEM parameter for mounts that are issued from the parmlib member only. The real data set name becomes the mounted file system's name.
  • TYPE identifies the PFS that supports this mounted file system. This operand must match the TYPE operand used on the FILESYSTYPE statement that defined the PFS.
  • MOUNTPOINT specifies the pathname of the mount point directory within the file hierarchy where this file system is to be mounted. This item is passed to the PFS, but only for informational purposes.
  • MODE specifies the type of access that the issuer of MOUNT has to this file system. READ is specified for read-only access, and RDWR is specified for read/write access.

    The LFS enforces this parameter to prevent operations such as writing and creating files. The PFS must ensure that it does not update access times for read operations, or otherwise change file systems that are mounted read-only.

  • PARM specifies a PFS-defined parameter text string. It may contain any value and be up to 1024 bytes long. The meaning of this text string is defined by the individual PFS, and the text is passed to the PFS for it to interpret and process.
  • SETUID | NOSETUID specifies whether the SETUID and SETGID mode bits on executables in this file system are to be respected. This is enforced by z/OS UNIX; the information is passed to the PFS for informational purposes only.

See the MOUNT command description in z/OS UNIX System Services Command Reference for more information about the MOUNT command.

The parameters are passed to the PFS on the vfs_mount operation. The FILESYSTEM or PARM values are used by the PFS to identify the file system object that is being mounted.

During vfs_mount the PFS is expected to:
  1. Ready the file system for all later processing.
  2. Save the device number that has been assigned to this file system so that it can be output on vn_getattr for any file within this file system. This number corresponds to the st_dev value of POSIX.
  3. Set output fields, as appropriate, in the MTAB.
  4. Create an inode that represents the root of the file system.
  5. Call osi_getvnode to create a vnode. The returned vnode token is saved in the inode.
  6. Return the vnode token of the root to the LFS.
  7. Return an 8-byte token that will be saved by the LFS and used on all subsequent VFS and vnode operations for this file system. This token is typically the address of the PFS's mount block. Its use is optional.

Porting note

This differs from some implementations in that vfs_root is not used to extract the vnode of the root of a just-mounted file system.

The root vnode is never explicitly inactivated. If this file system is unmounted, the vfs_umount operation implies vn_inactive for the root vnode-inode pair.

The PFS cannot use a signal-enabled wait or WAITX during MOUNT.

The LFS does not permit two mounts on a single MVS image with the same file system name. If the PFS identifies its mounted objects through the PARM parameter or by some other means, the PFS must permit or reject attempts to mount the same object more than once. If the mounted file system is on DASD, DASD file sharing must be taken into account. If the file system object is on or is using a resource that is shared by multiple systems, the PFS is responsible for managing or denying shared access.

The ROOT statement defines the system root. It is valid only from the parmlib member, and it has the same parameters as MOUNT, except that a MOUNTPOINT is not specified.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014