ADDMFS (Add Mounted File System)
Purpose
The Add Mounted File System (ADDMFS) command makes the objects in a file system accessible to the integrated file system (IFS) 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 via 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 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 the OS/400 Network File System Support book.
Restrictions
- You must have *IOSYSCFG special authority to use this command.
- If you are mounting a user-defined file system or a Network File System, *READ authority to the file system being mounted is required.
- If you are mounting a NetWare file system, *EXECUTE authority to the file system being mounted is required.
- You must have *W authority to the directory being mounted over.
Required Parameters
- TYPE
- Specifies the type of file system being mounted. The type of mount determines the correct form for the 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.
It must be in one of the following two 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 you specify a relative context that contains no dots and no path name after the colon, 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.
See the Examples section for examples of these forms.
- 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 parameter to determine the correct format for the MFS parameter.
- 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 in the opposite order from which they were mounted (last-in first-out order).
Optional Parameters
- OPTIONS
- The options list contains a character string of mount options. The keywords are separated by commas. For some keywords, an equal '=' and a value follow the keyword. If a keyword 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'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 protection option (ro or rw) is valid. For the mount of a NetWare file system, the protection (ro or rw), acregmax, acdirmax, noac, and nocto options are valid. If options that are not valid for the file system type you are mounting are specified, they are ignored.
options-list: The following are the available options keywords 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 Network File System, if suid is specified, setuid execution is allowed. If neither or 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 parameter. 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 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 client. 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 keyword 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 keyword is present, local storage of attributes and names is suppressed. If noac is not present, the default value of no suppression is assumed. If you specify noac, values specified for agregmin, agregmax, agdirmin, and agdirmax may be specified but are not used.
- 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.
Element 1: Data File CCSID
*BINARY: No conversion is used.
*ASCII: The ASCII equivalent of the coded character set identifier (CCSID) obtained from the default job CCSID is used.
*JOBCCSID: The coded character set identifier (CCSID) from the default job CCSID is used.
data-coded-character-set-identifier: A coded character set identifier (CCSID) to be assumed for data files on the remote system. Valid values are 1 through 65533.
Element 2: Path Name CCSID
*ASCII: The ASCII equivalent of the coded character set identifier (CCSID) obtained from the default job CCSID is used.
*JOBCCSID: The coded character set identifier (CCSID) from the default job CCSID is used.
path-name-coded-character-set-identifier: A coded character set identifier (CCSID) to be assumed for path names on the remote system. Valid values are 1 through 65533. Only CCSIDs that can be converted into ISO 10646(13488) are supported. See Globalization topic in the Information Center for a list of supported conversions.
- 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.
Note: This parameter is replaced by CCSID but the CODEPAGE parameter can still be used. However, because this parameter may be removed in a future release, whenever possible use the CCSID parameter.
Element 1: Data file code page
Note: You should specify a code page that has the same number of bytes per character as the original data. *BINARY: No conversion is used.
*ASCII: The ASCII equivalent of the code page obtained from the default job coded character set identifier (CCSID) associated with the current job is used.
*JOBCCSID: The code page obtained from the default job coded character set identifier (CCSID) associated with the current job is used.
data-code-page: A code page to be assumed for data files on the remote system. Only code pages that correspond to single- 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 code page obtained from the default job coded character set identifier (CCSID) associated with the current job is used.
*JOBCCSID: The code page from the default job CCSID associated with the current job is used.
path-name-code-page: A code page to be assumed for path names on the remote system. Only code pages whose CCSIDs are convertible into ISO 10646(13488) are supported. See the Globalization topic in the Information Center for a list of supported conversions.
Examples for ADDMFS
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.
Error messages for ADDMFS