Add Mounted FS (ADDMFS)
The Add Mounted File System (ADDMFS) command makes the objects in a file system accessible to the integrated file system name space. The file system to be made accessible can be either a user-defined file system (*UDFS) on the local system, a remote file system accessed through a local Network File System client (*NFS), or a local or remote NetWare file system (*NETWARE). The directory that is the destination for the mount, the Directory to mount over (MNTOVRDIR) parameter, must exist.
This command can also be issued using the following alternative command name:
For more information about Network File System commands, see Network File System book, SC41-5714
Restrictions:
- The user must have input/output (I/O) system configuration (*IOSYSCFG) special authority to use this command.
- If the user is mounting a NetWare file system, the user must have execute (*EXECUTE) authority to the file system to be mounted.
- The user must have write (*W) authority to the directory to be mounted over.
- The user must have execute (*X) authority to each directory in the path.
Keyword |
Description |
Choices |
Notes |
TYPE |
Type of file system |
*NFS, *UDFS, *NETWARE |
Required, Key, Positional 1 |
MFS |
File system to mount |
Path name |
Required, Key, Positional 2 |
MNTOVRDIR |
Directory to mount over |
Path name |
Required, Key, Positional 3 |
OPTIONS |
Mount options |
Character value, *DFT |
Optional |
CCSID |
Coded character set ID |
Element list |
Optional |
Element 1: Data file CCSID |
1-65533, *ASCII, *JOBCCSID, *BINARY |
Element 2: Path name CCSID |
1-65533, *ASCII, *JOBCCSID |
CODEPAGE |
Code page |
Element list |
Optional |
Element 1: Data file code page |
1-32767, *ASCII, *JOBCCSID, *BINARY |
Element 2: Path name code page |
1-32767, *ASCII, *JOBCCSID |
Type of file system (TYPE)
Specifies the type of file system to be mounted. The type of mount determines the correct form for the File system to mount (MFS) parameter.
- *NFS
- The file system specified for the MFS parameter is a Network File System. The MFS parameter must be of the form hostname:pathname where hostname can either be the name of a system or an IP address, and pathname must be an absolute path name.
- *UDFS
- The file system specified for the MFS parameter is a user-defined file system. The MFS parameter must be in one of the two following forms:
- /dev/qaspXX/udfsname.udfs where XX is one of the valid system or basic user auxiliary storage pool (ASP) numbers on the system, and udfsname is the name of the user-defined file system. All other parts of the name must appear as in the example above.
- /dev/aspname/udfsname.udfs, where aspname is one of the valid independent ASP names on the system, and udfsname is the name of the user-defined file system. All other parts of the name must appear as in the example above.
The name part of the path must be unique within the specified qaspXX or aspname directory.
- *NETWARE
- The file system specified for the MFS parameter is a NetWare file system. The MFS parameter must be one of the following forms:
- server/volume:pathname, where pathname is optional.
- NetWare Directory Services (NDS) context to a volume, a directory map object to mount, or an alias to a volume or directory map object. The NDS context can be a distinguished or relative context. If a relative context is specified the current context for the job is searched, and if it is not found the default system context is searched. If a context to a volume or an alias to a volume is specified an optional directory path may also be specified.
Note: On the MFS parameter, if a relative context is specified that contains no dots and no path name after the colon, the user must be sure to quote the parameter value when prompting on the command. The command analyzer may interpret the MFS value as a label and remove the trailing colon.
This is a required parameter.
File system to mount (MFS)
Specifies the path name of the file system to be mounted. It can be the path to a local Block Special File (*BLKSF), a remote NFS path name, or the path of a NetWare file system. See the Type of file system (TYPE) parameter to determine the correct format for the MFS parameter.
This is a required parameter.
Directory to mount over (MNTOVRDIR)
Specifies the path name of the existing directory that the file system will be mounted over. This directory gets 'covered' by the mounted file system. This directory must exist.
Multiple file systems can be mounted over the same directory, one on top of the other. However, only the topmost mounted file system is accessible, and the file systems must later be unmounted in the opposite order from which they were mounted (last-in first-out order).
This is a required parameter.
Mount options (OPTIONS)
The options list contains a character string of mount options. The options are separated by commas. For some options, an equal '=' and a value follow the option. If an option is not specified, the default value for that option will be used. The options list may contain spaces.
- *DFT
- The default value for the options string for the mount of a Network File System (*NFS) is:
'rw,suid,rsize=8096,wsize=8096,timeo=20,retrans=5,
acregmin=30,acregmax=60,acdirmin=30,acdirmax=60,hard'
The default value for the options string for the mount of a user-defined file system (*UDFS) is:
'rw,suid'
The default value for the options string for the mount of a NetWare file system (*NETWARE) is:
'rw,acregmax=60,acdirmax=60'
For the mount of a Network File System, all of the following options are valid. For the mount of a user-defined file system, only the ro, rw, suid and nosuid options are valid. For the mount of a NetWare file system, only the ro, rw, acregmax, acdirmax, noac, and nocto options are valid. If options are specified that are not valid for the file system type to be mounted, they are ignored.
- options-list
- The following are the available options and their descriptions:
- rw|ro
- This option specifies the protection for the mounted file system. Either ro (read-only) or rw (read-write) may be specified. If neither is specified, rw is assumed.
- suid|nosuid
- For the mount of a user-defined file system or a Network File System, if suid is specified, setuid execution is allowed. This means that bits other than the permission bits may be set. If nosuid is specified, setuid execution is not allowed.
- hard|soft
- For the mount of a Network File System, specifies whether NFS file systems are hard or soft mounted. Hard mounted means that operations on them are retried until they are acknowledged by the server. Soft mounted means that a timeout error is returned if a remote operation fails the number of times specified on the retrans option. If neither is specified, hard is assumed.
- rsize=n
- For the mount of a Network File System, specifies the size of the read buffer in bytes. The read buffer is used for data transfer between the NFS client and the remote NFS server on an NFS read request. The allowed range is 512 to 8096. If rsize is not specified, the default value of 8096 is assumed. For better performance, the read buffer should be a multiple of the the application buffer size.
- wsize=n
- For the mount of a Network File System, specifies the size of the write buffer in bytes. The write buffer is used for data transfer between the NFS client and the remote NFS server on an NFS write request. The allowed range is 512 to 8096. If wsize is not specified, the default value of 8096 is assumed. For better performance, the write buffer should be a multiple of the application buffer size.
- timeo=n
- For the mount of a Network File System, specifies the amount of time, in tenths of seconds, to wait for the client to respond on each try. The allowed range is 0 to 10000. If timeo is not specified, the default value of 20 tenths of a second (2 seconds) is assumed.
- retry=n
- For the mount of a Network File System, specifies the number of times to retry the mount operation. The allowed range is 0 to 10000. If retry is not specified, the default value of 5 retransmission attempts is assumed.
- retrans=n
- For the mount of a Network File System, specifies the number of times to retry the transmission to the server. The allowed range is 0 to 10. If retrans is not specified, the default value of 5 retransmission attempts is assumed.
- acregmin=n
- For the mount of a Network File System, specifies the minimum number of seconds to hold locally stored file attributes after file updates. The allowed range is 1 to 3600. If acregmin is not specified, the default value of 30 seconds is assumed.
- acregmax=n
- For the mount of a Network File System or a NetWare file system, specifies the maximum number of seconds to hold locally stored file attributes after file updates. The allowed range is 1 to 2,000,000,000. If acregmax is not specified, the default value of 60 seconds is assumed.
- acdirmin=n
- For the mount of a Network File System, specifies the minimum number of seconds to hold locally stored directory attributes after a directory update. The allowed range is 1 to 3600. If acdirmin is not specified, the default value of 30 seconds is assumed.
- acdirmax=n
- For the mount of a Network File System or a NetWare file system, specifies the maximum number of seconds to hold locally stored directory attributes after a directory update. The allowed range is 1 to 2,000,000,000. If acdirmax is not specified the default value of 60 seconds is assumed.
- nocto
- For the mount of a Network File System or a NetWare file system, specifies whether to force the refresh of remote attributes when opening a file. If this option is present, attributes are not refreshed from the server when opening a file, and changes are not sent to the server on the last close. If nocto is not present, the default value of no suppression is assumed.
- noac
- For the mount of a Network File System or a NetWare file system, specifies whether to suppress local storage of attributes and names. If this option is present, local storage of attributes and names is suppressed. If noac is not present, the default value of no suppression is assumed. If noac is specified, values specified for agregmin, agregmax, agdirmin, and agdirmax may be specified but are not used.
Coded character set ID (CCSID)
Specifies, for Network File Systems, a pair of coded character set identifiers (CCSIDs) to identify a specific character representation to be used. The first CCSID specifies what encoding scheme should be assumed for data files on the remote system. The second CCSID specifies what encoding scheme should be assumed for path names on the remote system.
This parameter is only valid if mounting a Network File System.
Element 1: Data file CCSID
- *BINARY
- No conversion is used.
- *ASCII
- The ASCII equivalent of the default job CCSID associated with the current job is used.
- *JOBCCSID
- The CCSID from the default job CCSID is used.
- 1-65533
- Specify a CCSID to be assumed for data files on the remote system.
Element 2: Path name CCSID
- *ASCII
- The ASCII equivalent of the default job CCSID associated with the current job is used.
- *JOBCCSID
- The CCSID from the default job CCSID is used.
- 1-65533
- Specify a CCSID to be assumed for path names on the remote system. Only CCSIDs that can be converted into UCS-2 level 1 (1200) are supported. See Globalization information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter for a list of supported conversions.
Code page (CODEPAGE)
Specifies, for Network File Systems, a pair of code pages. The first code page specifies what code page should be assumed for data files on the remote system. The second code page specifies what code page should be assumed for path names on the remote system.
This parameter is only valid if mounting a Network File System.
Note: This parameter is replaced by Coded character set ID (CCSID) but the CODEPAGE parameter can still be used. However, because this parameter may be removed in a later release, whenever possible use the CCSID parameter.
Element 1: Data file code page
Note: A code page that has the same number of bytes per character as the original data should be specified.
- *BINARY
- No conversion is used.
- *ASCII
- The ASCII equivalent of the default job coded character set identifier (CCSID) associated with the current job is used.
- *JOBCCSID
- The default job coded character set identifier (CCSID) associated with the current job is used.
- 1-32767
- Specify a code page to be assumed for data files on the remote system. Only code pages that correspond to single-byte or double-byte encoding schemes are supported. Code pages that correspond to mixed-byte encoding schemes are not supported.
Element 2: Path name code page
- *ASCII
- The ASCII equivalent of the default job coded character set identifier (CCSID) associated with the current job is used.
- *JOBCCSID
- The default job coded character set identifier (CCSID) associated with the current job is used.
- 1-32767
- Specify a code page to be assumed for path names on the remote system. Only code pages whose CCSIDs can be converted into UCS-2 level 1 (1200) are supported. See Globalization information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter for a list of supported conversions.
Example 1: Mounting a User-Defined File System
ADDMFS TYPE(*UDFS) MFS('/DEV/QASP03/PROD1') MNTOVRDIR('DIRB')
This command mounts a user-defined file system PROD1 over the directory, DIRB. It uses the defaults for the other parameters.
Example 2: Mounting a Network File System
ADDMFS TYPE(*NFS) MFS('RAINFALL:/QSYS.LIB/RAY.LIB')
MNTOVRDIR('/mystuff')
This command mounts the /qsys.lib/ray.lib file system from the remote system RAINFALL into the directory /mystuff.
Example 3: Mounting a Network File System with OPTIONS
ADDMFS TYPE(*NFS) MFS('RAINFALL:/QSYS.LIB/RAY.LIB')
MNTOVRDIR('/mystuff')
OPTIONS('ro,nosuid,rsize=256, retrans=10')
CODEPAGE(*ASCII *JOBCCSID) CCSID(*ASCII *JOBCCSID)
This command mounts the /qsys.lib/ray.lib file system from the remote system RAINFALL into the directory /mystuff. In addition it specifies to mount as read-only, not allow setuid execution, set the read buffer to 256 bytes, and the retransmission attempts to 10. The job CCSID is used to determine the coded character set identifier to use for remote path names.
Example 4: Mounting a NetWare File System with OPTIONS
ADDMFS TYPE(*NETWARE) MFS('RCHNWSVR1/LOTUS:LOTSUITE/SMARTCTR')
MNTOVRDIR('/temp1') OPTIONS('ro,agregmax=120')
This command mounts the NetWare directory LOTSUITE/SMARTCTR contained in the volume LOTUS that resides on server RCHNWSVR1 over the directory /temp1. In addition it specifies to mount as read-only, sets the maximum time to store file attributes locally to 120 seconds.
Example 5: Mounting using a NetWare Directory Services Context
Following are several examples of mounting a NetWare file system using NetWare Directory Services (NDS) contexts.
ADDMFS TYPE(*NETWARE) MFS('.LOTUS_VOL.ROCHESTER.IBM')
MNTOVRDIR('/temp1')
This command mounts NDS volume LOTUS_VOL using a distinguished context, over the directory /temp1.
ADDMFS TYPE(*NETWARE)
MFS('CN=LOTUS_VOL.OU=ROCHESTER:LOTSUITE/SMARTCTR')
MNTOVRDIR('/temp1')
This command mounts path LOTSUITE/SMARTCTR on NDS volume LOTUS using a relative path and fully qualified names, over the directory /temp1.
ADDMFS TYPE(*NETWARE) MFS('.CN=LOTUSMAP.OU=ROCHESTER.O=IBM')
MNTOVRDIR('/temp1')
This command mounts a directory map object using a distinguished context and fully qualified names, over the directory /temp1.
*ESCAPE Messages
- CPFA09C
- Not authorized to object. Object is &1.
- CPFA0A2
- Information passed to this operation was not valid.
- CPFA0A9
- Object not found. Object is &1.
- CPFA1B8
- *IOSYSCFG authority required to use &1.