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) integrates 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.

Please refer to the manual “NFS" [9] for details of how to mount nfs 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 (see Example).

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 also the note on "mount mount a file system" ).

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.

/etc/mnttab - Table of mounted file systems

The file /etc/mnttab contains information about all the file systems mounted on the local computer. This file contains information which is generated by the mount command.

Each line contains the following information; items are separated by any number of blanks and/or tabs:


Format

resource     mountp    fstype    spec-options    time


resource

Absolute path name of the mounted file system or, in the case of bs2fs file systems, mounted BS2000 files in wildcard syntax.

For bs2fs file systems the entry differs from the entry in the mount command as follows:

  • It is converted completely into uppercase notation

  • Escaped characters are displayed without the associated escape character

Example:


mount –F bs2fs –o ftyp=text :v70a:\$bach.sys\* /home/bach/bs2.1

generates the following entry in /etc/mnttab:

:V70A:$BACH.SYS* /home/bach/bs2.1 bs2fs ftyp=text,suid,rw,noquota ...


mountp

Absolute path name of the mount point.

fstype

File system type.

spec-options

Options as specified for the mount command.

time

Mount time, given in seconds since 1.1.1970


Entries in the /etc/mnttab file are deleted again if the umount or umountall command is executed for corresponding file systems or file system types.

Example

Enter the following in the POSIX shell: cat /etc/mnttab

/dev/root      /            ufs    rw,suid          802532552
/proc          /proc        proc   rw,              802532553
/dev/fd        /dev/fd      fdfs   rw               802532553
/dev/dsk/3     /var         ufs    suid,rw,noquota  802532558
/dev/dsk/2     /home1       ufs    suid,rw,noquota  802532588
SINTEST1:/nfs  /nfsclient   ufs    rw               802536261

/etc/vfstab  -  Table of defined file systems

The /etc/vfstab file describes every file system which is defined on the local computer. You can edit this file with an editor.

The file systems for which yes is entered in the automnt column of the /etc/vfstab file are mounted automatically when POSIX starts of by the mountall command.

In addition, the entries in the file are used to complement any missing details for resource or mountp and mount options when a mount command is executed.

Corresponding entries are generated automatically in the /etc/vfstab file for ufs file systems which are defined using the POSIX installation program. For all other file systems (e.g. bs2fs or nfs file systems) the entries must be created manually when required.

In contrast to the /etc/mnttab file, execution of the mount and umount commands for the /etc/vfstab file has no repercussions. Corresponding entries are retained.

The fields in the table are separated by blanks and/or tabs. A hyphen (–) indicates a blank entry in the relevant field. The table contains the following fields:


Format

special fsckdev mountp fstype fsckpass automnt mntopts


special

Describes the resource to be mounted.

The following must be borne in mind in the case of (manual) entries for bs2fs file systems:

  • Letters may only be specified in uppercase notation

  • Special characters may not be escaped, nor is it permissible to enclose the string in quotes

fsckdev

Name of the block-oriented device or of the resource of the character-oriented device.

mountp

Mount point: absolute path name of the directory in which the resource is to be mounted.

fstype

File system type.

fsckpass

The pass number to be used for multiple fsck commands

automnt

Specifies whether (yes) or not (no) the resource is to be mounted automatically by mountall at POSIX startup time.

mntopt

List of options separated by commas for mounting the file system. The options are the same as the specific_options of the mount command.


Example

Enter the following in the POSIX shell: cat /etc/vfstab

/dev/root              /dev/rroot     /                      ufs    1   yes     -
/proc                  -              /proc                  proc   -   no     -
/dev/fd                -              /dev/fd                fdfs   -   no     -
/dev/dsk/3             /dev/rdsk/3    /var                   ufs    1   yes     -
172.25.86.64:/home2/froede/SHARE  -   /home/froede/RETSINA   nfs    -   no     soft
PGOB0004:/home2/froede/SHARE      -   /home/froede/PGOB0004  nfs    -   no     soft
/dev/dsk/4             /dev/rdsk/4    /home/froede           ufs    1   yes     -
/dev/dsk/10            /dev/rdsk/10   /home/gast             ufs    1   yes     -
/dev/dsk/13            /dev/rdsk/13   /mnt/ascii             ufs    1   no     -
/dev/dsk/8             /dev/rdsk/8    /mnt/dat1              ufs    1   no     -
/dev/dsk/23            /dev/rdsk/23   /bs2fscont             ufs    1   no     -
/dev/dsk/24            /dev/rdsk/24   /home/bach/mount3      ufs    1   no     -
/dev/dsk/25            /dev/rdsk/25   /home/bach/mountxxx    ufs    1   no     -
/dev/dsk/26            /dev/rdsk/26   /home/bach/mountyyy    ufs    1   no     -
/dev/dsk/5             /dev/rdsk/5    /home/bach             ufs    1   yes     -
/dev/dsk/2             /dev/rdsk/2    /home/bach/mount99     ufs    1   yes     -o
/dev/dsk/6             /dev/rdsk/6    /suderlan              ufs    1   no     -
:V70A:$BACH.ASS.*.S    -              /home/bach/bs2.1       bs2fs  1   yes     ftyp=binary
:V70A:$BACH.CCC.*.C    -              /home/bs2.2            bs2fs  1   yes     ftyp=text
:V70A:$BACH.PLAMLIB*   -              /home/bach/bs2.2       bs2fs  1   yes     ftyp=textbin
:V70A:$BACH.SEM*.C     -              /home/bs2000           bs2fs  1   yes     -

Example 1

Displaying the mounted file systems (Format 1) and mounting a new file system (Format 2). This example was conducted under the POSIX system administrator’s ID.

# mount

/ on /dev/root read/write/setuid on Thu Jun  4 09:17:49 2009

/proc on /proc read/write on Thu Jun  4 09:17:49 2009
/dev/fd on /dev/fd read/write on Thu Jun  4 09:17:49 2009

/tmp on /dev/dsk/2 setuid/read/write/noquota on Thu Jun 4 09:17:50 2009

/var on /dev/dsk/3 setuid/read/write/noquota on Thu Jun  4 09:17:49 2009
/home on /dev/dsk/4 setuid/read/write/noquota on Thu Jun  4 09:17:51 2009

/home1 on /dev/dsk/5 setuid/read/write/noquota on Thu Jun  4 09:17:51 2009

/home2 on /dev/dsk/6 setuid/read/write/noquota on Thu Jun  4 09:17:51 2009
# mount -p

/dev/root - / ufs - no rw,suid

/proc - /proc proc - no rw

/dev/fd - /dev/fd fdfs - no rw

/dev/dsk/2 - /tmp ufs - no suid,rw,noquota

/dev/dsk/3 - /var ufs - no suid,rw,noquota

/dev/dsk/4 - /home ufs - no suid,rw,noquota

/dev/dsk/5 - /home1 ufs - no suid,rw,noquota

# mount -v

/dev/root on / type ufs read/write/setuid on Thu Jun  8 09:17:49 2009
/proc on /proc type proc read/write on Thu Jun  4 09:17:49 2009

/dev/fd on /dev/fd type fdfs read/write on Thu Jun  4 09:17:49 2009

/dev/dsk/2 on /tmp type ufs setuid/read/write/noquota on Thu Jun  4 09:17:50 2009

/dev/dsk/3 on /var type ufs setuid/read/write/noquota on Thu Jun  4 09:17:49  2009

/dev/dsk/4 on /home type ufs setuid/read/write/noquota on Thu Jun 4 09:17:51  2009

/dev/dsk/5 on /home1 type ufs setuid/read/write/noquota on Thu Jun 4 09:17:51  2009

/dev/dsk/6 on /home2 type ufs setuid/read/write/noquota on Thu Jun 4 09:17:51  2009

# mount -F ufs /dev/dsk/17 /home3

# mount -p

/dev/root - / ufs - no rw,suid

/proc - /proc proc - no rw

/dev/fd - /dev/fd fdfs - no rw

/dev/dsk/2 - /tmp ufs - no suid,rw,noquota

/dev/dsk/3 - /var ufs - no suid,rw,noquota

/dev/dsk/4 - /home ufs - no suid,rw,noquota

/dev/dsk/5 - /home1 ufs - no suid,rw,noquota

/dev/dsk/6 - /home2 ufs - no suid,rw,noquota

/dev/dsk/17 - /home3 ufs - no suid,rw,noquota

Example 2

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

#

See also

umount, mountall
mount(), umount() [4]