Format
>>-mount--pathname--name--type--flags--+------+----------------><
'-parm-'
>>-mount--stem-------------------------------------------------><
Purpose
mount invokes
the mount callable service to mount a file system, making the files
in it available for use.
Requirement: The
caller must have mount authorities to mount a file system. See the
section on mount
authority in z/OS UNIX System Services Planning.
When
used in a sysplex, mount can also be used
to change some of the mounted file system attributes, including the
system that owns that mount.
Parameters
- pathname
- The path name for the mount point.
- name
- The name of the file system to be mounted. You must specify HFS
data set names as fully qualified names in uppercase letters. Do not
enclose the data set name in single quotes.
- type
- The type of file system, as defined by the FILESYSTYPE parameter
on the BPXPRMxx parmlib member. Specify this as it is specified on
the parmlib member.
- flags
- A value indicating how the file system is to be mounted. To specify
the information, you can specify a numeric value (see REXX predefined variables) or one or more of the predefined
variables beginning with MTM_. If more than one variable is specified,
they are added together like open flags. (RDONLY and RDWR cannot be
specified together.) The predefined variables used to derive the appropriate
numeric value are:
- MTM_NOSECURITY
- Mount with no security.
- MTM_NOSUID
- The SETUID and SETGID mode bits
on any executable in this file system are to be ignored when the program
is run.
- MTM_RDONLY
- Mount read-only.
- MTM_RDWR
- Mount read-write.
- MTM_SYNCHONLY
- Mount must be completed synchronously;
that is, mount() must not return +1.
- parm
- The name of a variable that contains a parameter string to be
passed to the physical file system. The format and content of the
string are specified by the physical file system that is to perform
the logical mount.
For an HFS file system, parm is
not used.
- stem
- The name of a stem variable which contains the mount variables.
To set the mount variables, you can use a numeric value (see REXX predefined variables) or the predefined variables beginning
with MNTE_ used to derive the numeric value. Unused stem variables
should be set to the null string.
The following variables are used for mount requests:
Variable |
Description |
---|
MNTE_FILETAG |
4-byte file tag, the contents of which are mapped by the ST_FILETAG
structure in the BPXYSTAT mapping macro. BPXYSTAT is described in BPXYSTAT — Map the Response Structure for stat in z/OS UNIX System Services Programming: Assembler Callable Services Reference. |
MNTE_FSNAME |
The name of the HFS data set containing
the file system. |
MNTE_FSTYPE |
The file system type. |
MNTE_MODE |
The file system type mount method.
You can specify a numeric value (see REXX predefined variables)
or one of the following predefined variables used to derive the appropriate
numeric value: - MNT_MODE_RDWR
- File
system mounted read-write.
- MNT_MODE_RDONLY
- File system
mounted read-only.
- MNT_MODE_AUNMOUNT
- The file
system can be unmounted if the system's owner crashes.
- MNT_MODE_NOAUTOMOVE
- Automove
is not allowed.
- MNT_MODE_NOSEC
- No security
checks are enforced.
- MNT_MODE_NOSETID
- SetUID
is not permitted for files in this filesystem.
|
MNTE_PARM |
The parameter specified with mount(). |
MNTE_PATH |
The mountpoint path name. |
MNTE_SYSLIST |
A list of system names. For more
information about MNTE_SYSLIST, see BPXYMNTE in z/OS UNIX System Services Programming: Assembler Callable Services Reference. |
MNTE_SYSNAME |
The name of the file system to be
mounted on. |
The following variables are used for changing mount
attributes:
Variable |
Description |
---|
MNTE_FSNAME |
The name of the HFS data set containing
the file system. |
MNTE_MODE |
The file system type mount method.
You can specify a numeric value (see REXX predefined variables)
or one of the following predefined variables used to derive the appropriate
numeric value: - MNT_MODE_RDWR
- File
system mounted read-write.
- MNT_MODE_RDONLY
- File system
mounted read-only.
- MNT_MODE_AUNMOUNT
- The file
system can be unmounted if the system's owner crashes.
- MNT_MODE_NOAUTOMOVE
- Automove
is not allowed.
|
MNTE_RFLAGS |
Request flags (set to 3 to change
the automove attribute, 1 to change mount owner). |
MNTE_SYSNAME |
The name of the system to be mounted
on. |
MNTE_SYSLIST |
A list of system names. For more
information about MNTE_SYSLIST, see BPXYMNTE in z/OS UNIX System Services Programming: Assembler Callable Services Reference. |
Usage
- The mount service effectively creates a virtual file system. After
a file system is mounted, references to the path name that is mounted
refer to the root directory on the mounted file system.
- A file system can be mounted at only one point.
- Parameter specifics for the HFS physical file system:
- The name value must be uppercase and
must be the name of the data set.
- The parm parameter is not used.
- You can use a wildcard (*) as the last item (or only item)
of a system list (MNTE_SYSLIST). A wildcard is allowed only with an
INCLUDE list, not with an EXCLUDE list.
Examples
- To mount the HFS data set HFS.BIN.V1R1M0 on the mount point /v1r1m0 as
a read-only file system:
"mount /v1r1m0 HFS.BIN.V1R1M0 HFS" mtm_rdonly
- To mount an HFS read/write with this system as the owner:
m.=" /* set all of the stem variables to the null string */
m.mnte_mode=mnt_mode_rdwr
m.mnte_fsname='OMVS.HFS.U.WJS'
m.mnte_fstype='HFS'
m.mnte_path='/u/wjs'
address syscall 'mount m.'
- To mount an HFS file system read/write with system SYS2 as the
owner and with NOAUTOMOVE:
m.="
m.mnte_mode=mnt_mode_rdwr+mnt_mode_noautomove
m.mnte_fsname='OMVS.HFS.U.WJS'
m.mnte_fstype='HFS'
m.mnte_path='/u/wjs'
m.mnte_sysname='SYS2'
address syscall 'mount m.'
-
mnt.=''''
mnt.mnte_fsname = ''FS1.HFS''
mnt.mnte_path = ''/fs1''
mnt.mnte_mode = mnt_mode_rdwr
mnt.mnte_fstype = ''HFS''
/* build an INCLUDE system list */
syslist = ''SY1 SY2 SY3''
num_systems = d2c(words(syslist),2)
type_syslist = ''0000''x /* or ''0001''x for exclude list */
mnt.mnte_syslist = num_systems || type_syslist
do i = 1 to words(syslist)
mnt.mnte_syslist = mnt.mnte_syslist||left(word(syslist,i),8)
end
address syscall ''mount mnt.''
say ''mount RRR ='' retval errno errnoj