Mount a z/OS UNIX file system

You can use this operation to mount a z/OS UNIX file system on a specified directory.

HTTP method and URI path

PUT /zosmf/restfiles/mfs/<file-system-name>
Where:
  • /zosmf/restfiles specifies the z/OS data sets and files REST interface.
  • /mfs is used for managing file systems.
  • <file-system-name> is the file system that you want to mount.

Content type

The content type is application/json.

Required authorizations

See Required authorizations.

Usage considerations

See Usage considerations for the z/OSMF REST services.

Query parameters

None.

Standard headers

None.

Custom headers

Start of changeX-IBM-Target-System = <string>End of change
Start of changeThis header indicates the target system name (nick name) for this request, where the system name (nick name) is defined in the local system Systems table. The target host system must support single-sign-on by using either an LTPA token or a valid X-IBM-Target-System-User and X-IBM-Target-System-Password is provided for the target system. If the target system is the local system, this header is ignored and has no effect.End of change
Start of changeX-IBM-Target-System-UserEnd of change
Start of changeThis header indicates the z/OS® user ID that allows the user to access the target system. If the X-IBM-Target-System header is not supplied, this header is ignored. Both X-IBM-Target-System-Password and X-IBM-Target-System-User must be provided together. Otherwise, this header is ignored.
If this header is not provided in the current request, the current request uses the authenticated user credentials to access the target system if either of the following conditions are true:
End of change
Start of changeX-IBM-Target-System-PasswordEnd of change
Start of changeThis header indicates the password that is associated with the z/OS user ID. If the X-IBM-Target-System header is not supplied, this header is ignored. Both X-IBM-Target-System-Password and X-IBM-Target-System-User must be provided together; otherwise, this header is ignored.End of change

Request Body

The request body to mount a UNIX file system is shown in Table 1.

Table 1. Request body to mount a UNIX file system
Field Type Description
action String Specifies the action mount to mount an UNIX file system.
mount-point String Specifies the mount point to be used for mounting the UNIX file system.
fs-type String Specifies the type of file system to be mounted. This value must match the TYPE operand on a FILESYSTYPE statement in the BPXPRMxx parmlib member for your system.
mode String Specifies the mode in which the file system is mounted, as follows:
  • Specify rdonly for read only.
  • Specify rdwr for read/write.

The values are case-insensitive.

If not specified, this value defaults to rdonly.

Expected response

On completion, the service returns an HTTP response, which includes a status code that indicates whether your request completed. Status code 200 indicates success. Status code 204 indicates success. A status code of 4nn or 5nn indicates that an error occurred. For details, see Error handling.

If the request is successfully run, status code 204 indicates success and no content is returned.

Example request

In the following example, the PUT method is used to mount a UNIX file system.
PUT /zosmf/restfiles/mfs/JIAHJ.ZOSMF.DRIVER.HFS HTTP/1.1
Content-Type: application/json; charset=UTF-8 

Request body

{"action":"mount","mount-point":"/u/jiahj","fs-type":"HFS","mode":"rdonly"}

Example response

A sample response is shown in Figure 1.
Figure 1. Example: Mount a UNIX file system
204 No Content
Content-Type:  application/json; charset=UTF-8
Content-Length:  0
Date:  Thu, 17 Sep 2015 08:05:41 GMT