stfsmount

Mounts the global namespace.

Read syntax diagramSkip visual syntax diagram
>>-stfsmount--+-------------+--mount_point--+------------+------>
              '-client_name-'               +- -readonly-+
                                            '- -ro-------'

>--+---------+--+----------+--+----------+--+-----------+------->
   '- -quiet-'  '- -nosuid-'  '- -noexec-'  '- -noatime-'

>--+--------------+--+---------------+-------------------------->
   '- -nodiratime-'  '- -synchronous-'

>--+-------------------------+--+----------------+-------------->
   '- -mandatory_range_locks-'  '- -always_empty-'

>--+----------------+--+------------------+--------------------->
   '- -dac_override-'  '- -uid_owner--uid-'

>--+------------------+--+----------------+--------------------->
   '- -gid_owner--gid-'  '- -fstype--name-'

>--+------------------------------+--+----------+--------------><
   '- -standindevice--device_name-'  '- -nomtab-'

Parameters

client_name
Identifies the unique name of the virtual client to which you want to mount the global namespace. The client must be up and running. The default client name is the host name of the client system.
mount_point
Specifies the directory associated with the global namespace image that you want to mount.
–readonly | –ro
Sets the global namespace image to read only. If specified, an attempt to update data or metadata in the global namespace will fail, and an attempt to access a file-system object will not update its access-time attribute.
–quiet
Turns off informational messages for this command. This parameter does not affect error messages.
–nosuid
Ignores the set user ID and set group ID flags on files that are accessed in the global namespace image. You cannot get special privileges by executing these files.
–noexec
Ignores the exec flag on files accessed in the global namespace image, except to indicate its existence. You cannot execute files.
–noatime
Specifies not to update the access-time attribute when a file-system object is accessed in the global namespace image.
Note: The virtual client does not update the access time of a file-system object when it accesses its attributes. It only updates the access time when it accesses its contents.
–nodiratime
Specifies not to update the access-time attribute when a directory is accessed in the global namespace image.
Note: The virtual client does not update the access time of a directory every time it is accessed. It updates the access time when you read the directory, but not when you look up a specific name in it.
–synchronous
Specifies not to return system calls that update file data or metadata in this global namespace image until after the updates have been committed to storage.

Without this parameter, system calls return as soon as the changes are stored in kernel-cache memory, and the changes are committed to storage some time later (automatically or by user request).

–mandatory_range_locks
Allows mandatory range locking to be available in the global namespace image.

Without this parameter, all range locks set or seen through the global namespace image are advisory, as defined by POSIX. This means that you can lock a range of a file, but no one has to respect that lock, and you do not have to respect anyone else's locks.

With the parameter, some range locks can be mandatory to an extent. Range locks do not have an advisory or mandatory state. But when you access a range of a file that is locked, Linux treats the lock as mandatory or advisory depending on whether the file image that you access is in mandatory or advisory range lock mode. A file image is in mandatory-range-lock mode if it was created while the global namespace image had mandatory range locks allowed and the file had the set group ID flag on and the group execute flag off.

Mandatory range locks are considered mandatory only with respect to a particular global namespace image.

A client does not know whether another client considers a lock mandatory or advisory. So, if you access a file using multiple processes on the same system, through the same global namespace image, mandatory locks are fully mandatory. But another client, or even a process accessing the same client from a different global namespace image, is free to consider the locks advisory.

When the owning group of a file changes, its set group ID flag gets turned off, and range locks are no longer mandatory. This is normal behavior for the set group ID flag, but in many Linux file-system types, it is suspended for the special case of the set group ID flag that means mandatory range lock. SAN File System does make that special exception because the flag does not have the same meaning on non-Linux client. Note, that as with any Linux mandatory range lock, they do not restrict access to the file uisng a private mmap.

You can change the mandatory-range-locks-allowed status of a global namespace image by remounting.

The mandatory-range-lock status takes effect when a file is opened. Changing the mandatory-range-lock attribute for the global namespace image after you open the file does not change the file's status. For example, if you have a file open with mandatory range locks allowed, and then you disallow mandatory range locks, all locks on that file, including subsequent ones, are still mandatory until you close the file.

–always_empty
The Linux statfs command retrieves the approximate number of available blocks and free blocks in the global namespace. The number of available blocks is the total number of blocks in all storage pools presently in all the clusters that are reachable through the global namespace image. The number of free blocks is the number of blocks in all the clusters that are in partitions that are not assigned to any fileset.
Note: Based on these numbers, an application designed for a simpler file system might conclude that there is no space available to store new data when in fact there is plenty of space within partitions that are already assigned to the fileset, or that there is a large pool of storage not presently attached to a cluster but ready to be attached when demanded. If specified, the statfs command returns the largest number it can for the number of available blocks and returns that number minus one for the number of free blocks. If the number of blocks is too large for the statfs command to return, the command behaves as if you specified the –always_empty parameter. This is the case when you have more than 16 TB of space in the SAN File System.
–dac_override
Enables capability to override regular permissions on a file, regardless of root client status.
–uidowner uid
Sets the owner user ID for each file accessed in the global namespace image. The owner user ID stored in the file system is ignored.

If not specified, the global namespace image uses the real owner user ID stored in the file system.

Note: You cannot set the owner user ID in the global namespace. An attempt to set it to user ID does succeed, but the global namespace does not actually get changed. An attempt to set it to anything else fails.
–gidowner gid
Sets the owner group ID for each file accessed in the global namespace image.
–fstype name
Specifies the name of the file-system type to use for the file-system-driver instance. This is the same name used to load the file-system driver.

If you do not specify a file-system-type name, the system defaults to the file-system-type named "stfs".

Use this parameter only when you load multiple instances of the file-system driver on the same client system.

–standindevice device_name
Specifies the device-specific file name of the standin block device for the global namespace image. If you specify a standin block device that is already being used for an existing global namespace image, this command does not create a new global namespace image. Instead, it mounts the existing global namespace image again, without disturbing the existing mounts.

In order to make Linux NFS export SAN File System files, the file-system type presents itself to Linux as a device-based file-system type, as opposed to a network file-system, such as NFS. But because the global namespace does not actually live on a device (it lives on a collection of devices and a metadata server), a block device must stand in for the global namespace wherever it makes a difference. Accordingly, every global namespace image is associated with a block device, known as the standin block device. The file-system driver contains a block-device driver and constitutes a set of very simple block devices whose only job is to be standin block devices. They cannot be used for anything. If you exports SAN File System files from NFS, make sure you do not use the same standin block device for two different SAN File Systems (at different times).

Note: You must specify one of the file-system-driver instance's standin block devices. You can see what these are in the standin proc file for the file-system type.

Note that the device is identified with the global namespace image by device number, not by the device-specific file name. You can delete the device-specific file after the stfsmount command completes.

The value of this parameter is what shows up as the file-system identifier in the Linux mount table listing in /proc/mounts.

You can create a block-device-specific file using the Linux mknod command.

If not specified, the stfsmount command uses an unused standin block device. It creates a temporary block-device-specific file for it and adds the name of that temporary file to the Linux mount table. It creates the file in the directory defined by the TMPDIR environment variable, or /tmp if TMPDIR is not defined. It uses a lock file to prevent two processes that are simultaneously running the stfsmount command from choosing the same unused standin block device. It creates that file in the same temporary directory as the block-device-specific file.

–nomtab
Specifies not to record the mount in the /etc/mtab file.

If not specified, the stfsmount command adds an entry to the /etc/mtab file describing the global namespace image if the mount is successful. It then locks the file using the /etc/mtab~ lock file while it attempts the mount and updates /etc/mtab. If specified, this command does not attempt to lock or update /etc/mtab.

Note that /etc/mtab is obsolete and would only need to be updated if it might be referenced by existing applications. /proc/mounts contains more reliable information, straight from the kernel itself.

Prerequisites

You must have root privileges to use this command.

Description

This command creates an image of the global namespace on the client system by mounting a directory. The global namespace maintains a list of its directories that are available to the clients. When a client mounts a directory in the global namespace, that directory and its subdirectories become part of the client's directory hierarchy.

Note: This command is used in place of the mount command to mount the global namespace.

Before you can mount the global namespace, you must have a virtual client running on the client system. To create the virtual client, use the stfsclient –create command.

Remounting the global namespace image is not the same as unmounting the global namespace and then mounting it again. Rather, it changes the attributes of an existing global namespace image, such as changing from read-write to read-only mode. To remount the global namespace image you can use the Linux mount command.

To unmount the global namespace, use the Linux umount command.

Example

Mount the global namespace The following example mounts the global namespace:
stfsmount mnt/SANFS_MOUNTPT -fstype sanfs

Parent topic: Linux-client commands

Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.