Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

mount - mount a file system

&pagelevel(4)&pagelevel

mount (Format 2 and Format 3) mounts a ufs file system into the file system hierarchy at the path name position mountpoint. This position must already exist. If mountpoint possesses any contents prior to the mount operation these remain hidden until the file sysem is dismounted again.

mount (Format 4 and Format 5) mounts a bs2fs file system at a particular position in the POSIX file system. A bs2fs file system is understood to be a selectable set of files in BS2000 which are made available transparently in POSIX so that they can be accessed using POSIX means (commands, program interfaces). The files are selected via the user and catalog ID and wildcard symbols.

In addition, mount (Format 1) can be used to output a list of all the mounted file systems.


Syntax


Format 1: mount[ -v | -p]
Format 2: mount[ -F ufs][ -V][ -r]
     [ -o spec_options] { resource | mountpoint}
Format 3: mount[ -F ufs][ -V][ -r]
     [ -o spec_options] resource mountpoint
Format 4: mount[ -F bs2fs][ -V][ -r]
     [ -o spec_options] { resource | mountpoint }
Format 5: mount[ -F bs2fs][ -V][ -r]
     [ -o spec_options] resource mountpoint
Display a list of mounted file systems
Format 1: mount[ -v | -p]


No option specified

mount displays a list of all mounted file systems (see Example).

-v

Displays a new presentation of the output. The new output contains the file system type and options in addition to the information in the old output. The fields mountpoint and resource change places (see Example).

-p

Displays a list of the mounted file systems in the /etc/vfstab format.

mount ufs file systems
Format 2: mount[ -F ufs][ -V][ -r]
     [ -o spec_options] { resource | mountpoint}
Format 3: mount[ -F ufs][ -V][ -r]
     [ -o spec_options] resource mountpoint

The descriptions of Format 2 and Format 3 have been combined, since they differ only in terms of the (optional) specifications resource and mountpoint.

Format 2 can be used only if an entry for the relevant file system already exists in the /etc/vfstab file. The missing specification for resource or mountpoint is then added from this.

Formats 2 and 3 can be entered only by the POSIX administrator.


No option specified

mount displays a list of all mounted file systems.

-F ufs

Specifies ufs as the file system type.

-V

Displays the entire command line on screen but does not execute the command. The command line is displayed together with the options and arguments entered by the user and with the values derived from /etc/vfstab. This option allows you to check the general validity of the command line.

-r

Mounts the file system with read access.

-o

Specifies ufs file system-specific options. Multiple options should be comma-separated. If invalid options are specified a warning is issued and the invalid options are ignored.

The following options may be selected:

f

Imitates an /etc/mntab entry but does not mount a file system. The parameters are not checked.

n

Mounts the file system without making an entry in /etc/mnttab.

journal


The function "Journaling" is no longer supported, i.e. the option is ignored.


rw | ro

Read/write or read only access. The default value is rw.

nosuid

By default, the file system is mounted in such a way that the s-bit is set for users. If you specify nosuid then the default value is deactivated and the file system is mounted without the s-bit being set for users.

remount

Is used together with rw. A file system which has been mounted with read access only can be remounted with read/write access. This option fails if the file system is not currently mounted or has been mounted with rw.

bs2fscontainer

Specifies the file system which is to be mounted as the bs2fs container, i.e. as a file system which temporarily accommodates files from bs2fs file systems.

This option may only be specified for a single ufs file system. Any other mount commando with this option is rejected.

The -r, -o ro, -o journal and -o remount options may not be specified together with the bs2fscontainer option.

When the POSIX installation program is used, this option can be entered via the option line.


This option can only be specified for a file system which was flagged as the bs2fs container when it was created with the POSIX installation program. When the append function is applied to a ufs file system which is to be created or overwritten, the bs2fscontainer option must be specified in the option line for this purpose.
If this is not done, the mount is aborted with an error and the file system, together with its content, is retained.
The ufs file system that serves as the bs2fs container is expected to be an empty file system.
If it is not empty, its content is deleted using the –o bs2fscontainer option when the mount command is executed.
After a successful mount, two bs2fsd copy daemons are started automatically.


resource

specifies the file system which is to be mounted.

mountpoint

Specifies the local position for mounting resource. You must specify an absolute path name.

mount bs2fs file sytems
Format 4: mount[ -F bs2fs][ -V][ -r]
     [ -o spec_options] { resource | mountpoint }
Format 5: mount[ -F bs2fs][ -V][ -r]
     [ -o spec_options] resource mountpoint


The descriptions of Format 4 and Format 5 have been combined, since they differ only in  terms of the (optional) specifications resource and mountpoint

Format 4 can be used only if an entry for the relevant file system already exists in the  /etc/vfstab file. The missing specification for resource or mountpoint is then added from this (see Hint).

Formats 4 and 5 can be entered only by the POSIX administrator.

A prerequisite for entering a mount command of Format 4 or 5 is that a bs2fs container is already mounted.


No option specified

mount displays a list of all mounted file systems.

-F  bs2fs

Specifies bs2fs as the file system type.

-V

Displays the entire command line on screen but does not execute the command. The command line is displayed together with the options and arguments entered by the user and with the values derived from /etc/vfstab. This option allows you to check the general validity of the command line.

-r

Mounts the file system with read access.

-o

Specifies bs2fs file system-specific options. Multiple options should be comma-separated. If invalid options are specified a warning is issued and the invalid options are ignored. The following options may be selected:

rw | ro

Read/write or read only access. The default value is rw.

nosuid

The file system is mounted without setting the s bit for users. This option is enabled by default for bs2fs file systems and cannot be disabled.

remount

Is used together with rw. A file system which has been mounted with read access only can be remounted with read/write access. This option fails if the file system is not currently mounted or has been mounted with rw.

ftyp={text|binary|textbin}

This option has the same effect as the ftyp command when copying files using the bs2cp command. It defines whether BS2000 SAM files and text type POSIX library elements (element type other than L) are interpreted in POSIX as text or binary files. PAM files are always interpreted as binary files, ISAM files always as text files.

This option should only be specified once. If it is specified more than once, the specification with the highest priority applies, where ftyp=textbin has the highest priority, ftyp=text the next highest priority and ftyp=binary the lowest priority.

The default is ftyp=text.

ftyp=text

SAM files and text-type library elements are interpreted as text files. When writing to a bs2fs file, end-of-line characters (X'15') are converted to a record change and tabulator characters (X'05') to the corresponding number of blanks.

ftyp=binary

SAM files and text-type library elements are interpreted as binary files. A 1:1 transfer takes place without interpreting and converting data (record change/end-of-line characters, tabulator/blanks, etc.).

ftyp=textbin

SAM files and text-type library elements are interpreted as binary text files. When writing to a bs2fs file, only end-of-line characters (X'15') are converted to a record change. Tabulator characters (X'05') are not converted to blanks.

ressource

Defines which BS2000 files are to be mounted. The following syntax applies for the option:

:cat:$user.filename-with-wild

The option can be entered in upper- or lowercase or in a mixture of both. Special characters of the POSIX shell such as '$' or '*' must be escaped explicitly.

cat

Catalog ID

user

BS2000 user ID

filename-with-wild

BS2000 file name with wildcard symbols:

*

Replaces an arbitrary (even empty) string.

/

Replaces precisely one arbitrary character.

. Terminating period

Partially -qualified entry of a name.
Corresponds implicitly to the string "./*", i.e. at least one arbitrary character follows the period.

<sx:sy>

Replaces a string that meets the following conditions:

  • It is at least as long as the shortest string (sx or sy)
  • It is not longer than the longest string (sx or sy)

  • It lies between sx and sy in the alphabetic collating sequence; numbers are sorted after letters (A...Z, 0...9)
  • sx can also be an empty string which is in the first position in the alphabetic collating sequence
  • sy can also be an empty string which in this position stands for the string with the highest possible code (contains only the characters X'FF')

<s1,...>

Replaces all strings that match any of the character combinations specified by s. s can also be an empty string.

Any such string can also be a range specification "sx:sy".

-s

Replaces all strings that do not match the specified s. The minus sign may only appear at the beginning of the string. 

The file set defined with resource can consist of both existing files and files which are to be created. When a new file is to be created, the required file name must match the wildcard pattern of the corresponding mount command.

mountpoint

Specifies the local position for mounting resource. You must specify an absolute path name. If mountpoint is a symbolic reference then the file system is mounted in the directory to which the symbolic reference points rather than being mounted alongside the symbolic reference.

Hint

If an entry for the file system concerned exists in the /etc/vfstab file, one of the options resource or mountpoint can be omitted (Format 2 or 4). When a bs2fs file system is used, the following must be observed in this case:

  • If the mountpoint option is specified, an entry in /etc/vfstab can then be identified unambiguously and the corresponding file system is mounted.

  • If only the resource option is specified, multiple suitable entries for a bs2fs file system can be contained in the /etc/vfstab file as this file system can be mounted in parallel at multiple locations. In this case only the first bs2fs file system entered in the /etc/vfstab file is mounted. Only entries with an identical wildcard string are recognized as suitable entries. Entries with a different wildcard string are also not taken into account even if they define the same set of files.

File

/etc/mnttab

Table of mounted file systems.

/etc/dfs/fstypes

The default type of distributed file system.

/etc/vfstab

Table of automatically mounted file systems.

Example

Mounting the bs2fs container and a bs2fs file system. The example executes under the POSIX administrator ID.

# mount –F ufs –o bs2fscontainer /bs2fscont
# mount -F bs2fs ':V70a:$sysaudit.sys.conslog.2007-06*'  /home/bs2.conslog
# mount
/ on /dev/root read/write/setuid on Tue Nov 27 11:31:04 2007
...
/bs2fscont on /dev/dsk/23 bs2fscontainer/setuid/read/write/noquota on Tue Nov 27  11:35:23 2007
/home/bs2.conslog on :V70A:$SYSAUDIT.SYS.CONSLOG.2007-06* ftyp=text/nosuid on Tue Nov 27 13:52:23 2007
#