Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Overview of the mount and unmount operations

&pagelevel(3)&pagelevel

This section describes the internal procedures for mounting and unmounting the bs2fs container and bs2fs file systems.

Mounting the bs2fs container

Mounting the ufs file system with the property bs2fs container (mount -o bs2fscontainer...) is the prerequisite for mounting bs2fs file systems. The bs2fs container is the physical medium in which the files of bs2fs file systems are stored temporarily during the time they are edited. When the bs2fs container is mounted, it is expected to be empty. If this is not the case because of an error in a previous session, the content is deleted when the bs2fs container is mounted.

A ufs file system can be mounted as these bs2fs container only if it was flagged appropriately when it was created (POSIX installation program). This prevents a ufs file system which was not intended for use as the bs2fs container from being mounted inadvertently as the bs2fs container, which would delete its contents. As additional protection you are recommended as far as possible to mount the bs2fs container automatically.

The bs2fs container should be invisible for the users. Only indirect access to the contents of the bs2fs container should be possible for them, i.e. by accessing the files in the mounted bs2fs file systems. These are redirected internally to the files in the bs2fs container.

Direct access to the bs2fs container should only be possible for the system administrator and solely for diagnostic purposes.

Unmounting the bs2fs container

The bs2fs container can only be unmounted if no bs2fs file systems are still mounted.

Mounting a bs2fs file system

When a bs2fs file system is mounted, a directory with the name catid.userid.number is created in the bs2fs container, where:

catid

catalog ID from the resource operand of the mount command

userid

user ID from the resource operand of the mount command

number

number with which the mount operations for bs2fs file systems are numbered in chronological order within a session

This directory is used to contain maps of objects (file, library, element type or library element) of a bs2fs file system if these have been opened for editing with open() or opendir(). These maps in the bs2fs container are always single files, even if the corresponding object in the bs2fs file system is presented as a directory. The mounted BS2000 files are therefore not stored physically at the mount point of the bs2fs file system but are located ("invisibly" for the user) in a directory of the bs2fs container reserved for this bs2fs file system.

In addition, directories also exist on the uppermost level of a bs2fs file system. Their map files which are created with open or opendir are views of these directories which are local to the process and are called %userid%pid, where userid is the BS2000 user ID (8 characters with blanks) of the caller of open or opendir and pid is their process ID, specifically, for example, "%BACH    %00123".

The table below shows how the names of the objects in the bs2fs file system are mapped to file names in the bs2fs container:

Type in BS2000

Name in the bs2fs
file system

Type in the
bs2fs file
system

Name of the file in the
bs2fs container

DVS file

<file>

File

<file>

PLAM library

<lib>

Directory

<lib>%

Element type

<lib>/<type>

Directory

<lib>%<type>%

Library element

<lib>/<type>/<memb>

File

<lib>%<type>%<memb>+<ver>

where

<file>

File name

<lib>

Library name

<type>

Element type

<memb>

Element name 

<ver>

Element version

The table below shows this mapping again for specific examples:

Object that is opened with open() or
opendir()

Name of the
bs2fs file system

File name in the
bs2fs-Container

DVS file SOURCEFILE

sourcefile

sourcefile

PLAM library MYPLAMLIB

myplamlib

myplamlib%

Type S subdirectory of the PLAM
library MYPLAMLIB

myplamlib/s

myplamlib%s%

Type S element SOURCE1 of the
PLAM library MYPLAMLIB (where the
highest element version is 001)

myplamlib/s/source1

myplamlib%s%source1+001

The map files in the bs2fs container are created with first open() or opendir() for the relevant object and are deleted again with the last close() or closedir(). No map files exist in the bs2fs container for files or directories which are accessed in a different manner.

Unmounting a bs2fs file system

When a bs2fs file system is unmounted, the corresponding directory in the bs2fs container is deleted.