mount - Logically mount a file system

Format

mount [-t fstype] [-rv] [-a yes|include,sysname1,... sysnameN |exclude,|no|unmount] [-o fsoptions] [-d destsys] [-s nosecurity|nosetuid] -f fsname pathname[-wn]

mount -q [-d destsys][-v] pathname

File tag specific option:

mount [-c ccsid,text|notext]

Description

The mount shell command in /usr/sbin is used to mount a file system or list all mounts over a file system.

You must have mount authority before you can issue the mount command. See Mounting file systems in z/OS UNIX System Services Planning.

Options

-a yes|include,sysname1,...,sysnameN|exclude,sysname1,...,sysnameN|no|unmount
The -a option specifies the AUTOMOVE attribute of the file system in a sysplex environment where systems are exploiting the shared file system capability.
  • -a yes allows the system to automatically move logical ownership for a specified file system as needed. This is the default.
  • -a no prevents ownership movement in some situations.
  • -a unmount unmounts the file system in some situations.
  • -a include,sysname1,...,sysnameN specifies a list of systems, in priority order, to which the file system's ownership can be moved. include can be abbreviated to i.
  • -a exclude,sysname1,...,sysnameN specifies a list of systems, in priority order, to which the file system's ownership cannot be moved. exclude can be abbreviated to e.
For more information about the AUTOMOVE options, see Customizing BPXPRMxx for a shared file system in z/OS UNIX System Services Planning.
-d destsys
Specifies the name of the system in a shared file system environment that will be the logical owner of the mount. Note, if -q is specified, the mount -q output will only list mounts that are owned by destsys.
-f fsname
Names the file system to be mounted. All file system names must be unique. File system names are case-sensitive. The file system name has a maximum length of 44 characters; any additional characters are truncated. Options -q and -f are mutually exclusive, but one must be specified.

If the file system type is HFS, or if the type was not specified on the command and the file system is zFS, fsname is converted to uppercase.

-wn
Specifies the amount of time the mount will wait in seconds for async mounts to complete. If n is specified as a 0 the wait will be indefinite. This option flag is tolerated on any form of the mount command and is ignored if not appropriate (no wait needs to be done).
-o fsoptions
Specifies an option string to be passed to the file system type. NFS, for example, uses this to identify the remote server and the object on that server. The format and content are specified by the physical file system that is to perform the logical mount. You can specify lowercase or uppercase characters. Enclose the string in single quotation marks.
Refer to the following for the appropriate file system-specific options to specify for fsoptions:
-q
Prints a list of path names for the mount points of file systems that are mounted over another file system, including that system. Options -q and -f are mutually exclusive, but one must be specified. If -v is not specified, only path names for mount points are printed. Note that the output of mount -q can be used by the unmount utility as input. See Examples.
If -q and -v are specified then the output consists of a 6-character mode, followed by the file system name, followed by the file system mount point path name. The 6-character mode can be interpreted as shown in Table 1.
Table 1. Output of the mount -q and -v options
Column Flags Description
1
-
R
Read/write
Read-only
2
-
S
SETUID supported
SETUID not supported
3
-
E
File system not exported
File system exported by DFS
4
-
U
Security checks enforced
No security checks enforced
5
-
A
U
Noautomove
Automove
Unmount
6
-
C
Owning system or sysplex-aware
Client
-r
Specifies mounting a file system read-only.
-s nosecurity|nosetuid
Specifies that a file system is unsecured. Setuid, setgid, APF and program-controlled attributes are ignored when you use nosetuid. To additionally disable authorization checking, use nosecurity. Minimum unique abbreviations can be used for the option arguments.
Note: When a file system is mounted with the NOSECURITY option enabled, any new files or directories that are created are assigned an owner of UID 0, no matter what UID issued the request.
-t fstype
Identifies the file system type. fstype can be entered in mixed case but will be treated as uppercase. If this option is not specified, the default is -t HFS.
-v
Verbose output. Includes additional information, if available, on output. If -v is specified on the mount command and the mount fails, the file system name that had the mount failure will be included in the failure information.

pathname specifies the path name for the mount point.

File tag-specific option

-c ccsid,text|notext
Specifies the file tag that will be implicitly set for untagged files in the mounted file system.
ccsid
Identifies the coded character set identifier to be implicitly set for the untagged file. ccsid is specified as a decimal value from 0 to 65535. However, when text is specified, the value must be between 0 and 65535. Other than this, the value is not checked as being valid and the corresponding code page is not checked as being installed.

For more information about file tagging, see Setting up Enhanced ASCII in z/OS UNIX System Services Planning.

text
Specifies that each untagged file is implicitly marked as containing pure text data that can be converted.
notext
Specifies that none of the untagged files in the file system are automatically converted during file reading and writing.

Examples

  1. The output of mount -q can be used for the input of unmount. For example:
    mount -q /ict/zfsfir
    can be used as input:
    unmount $(mount -q /ict/zfsdir)
  2. To mount a zFS file system over /u/wjs with a sync interval of 120 seconds:
    mount -f omvs.zfs.user.wjs -o 'SYNC(120)' /u/wjs
  3. To display a list of path names for all mount points under /u:
    mount -q /u

Usage notes

  1. Systems exploiting shared file system will have I/O to an OMVS couple data set. Because of these I/O operations to the CDS, each mount request requires additional system overhead. You will need to consider the effect that this will have on your recovery time if a large number of mounts are required on any system participating in shared file system.
  2. The -a unmount is not available to automounted file systems.
  3. The file system name is treated as uppercase when the file system type is not specified (-t option).

File system recovery and mount

File system recovery in a shared file system environment takes into consideration file system specifications such as -a yes|no|unmount and whether the file system is mounted read-only or read/write.

Generally, when an owning system fails, ownership over its -a yes mounted file system is moved to another system and the file is usable. However, if a file system is mounted read/write and the owning system fails, then all file system operations for files in that file system will fail. This is because data integrity is lost when the file system owner fails. All files should be closed (BPX1CLO) and reopened (BPX1OPN) when the file system is recovered.

For file systems that are mounted read-only, specific I/O operations that were in progress at the time the file system owner failed might need to be submitted again. Otherwise, the file system is usable.

In some situations, even though a file system is mounted with the -a yes option, ownership of the file system might not be immediately moved to another system. This may occur, for example, when a physical I/O path from another system to the volume where the file system resides is not available. As a result, the file system becomes "unowned" (the system will issue message BPXF213E when this occurs). This is true if the file system is mounted either read/write or read-only. The file system still exists in the file system hierarchy so that any dependent file systems that are owned by another system are still usable.

However, all file operations for the unowned file system will fail until a new owner is established. The shared file system support will continue to attempt recovery of --a yes mounted file systems on all systems in the sysplex that are enabled for shared file system. Should a subsequent recovery attempt succeed, the file system transitions from the unowned to the active state.

Applications that use files in unowned file systems must close (BPX1CLO) those files and reopen (BPX1OPN) them after the file system is recovered.

File systems that are mounted with the -a no option will become unowned when the file system owner exits the sysplex. The file system will remain unowned until the original owning system restarts or until the unowned file system is unmounted. Because the file system still exists in the file system hierarchy, the file system mount point is still in use.

An unowned file system is a mounted file system that does not have an owner. The file system still exists in the file system hierarchy. As such, you can recover or unmount an unowned file system.

File systems that are associated with a never move PFS will be unmounted during dead system recovery. For example, TFS is a never move PFS and will be unmounted, as well as any file systems mounted on it, when the owning system leaves the sysplex.

As stated in Usage notes, -a unmount is not available to automounted file systems. However, during dead system recovery processing for an automounted file system (whose owner is the dead system), the file system is unmounted if it is not being referenced by any other system in the sysplex.

Exit values

0
Successful completion.

Related information

chmount, unmount