3.2. Mounting a File System

3.2. Mounting a File System

Before you can mount a GFS file system, the file system must exist (refer to Section 3.1, “Creating a File System”), the volume where the file system exists must be activated, and the supporting clustering and locking systems must be started (refer to Chapter 2, Getting Started and Configuring and Managing a Red Hat Cluster. After those requirements have been met, you can mount the GFS file system as you would any Linux file system.

To manipulate file ACLs, you must mount the file system with the -o acl mount option. If a file system is mounted without the -o acl mount option, users are allowed to view ACLs (with getfacl), but are not allowed to set them (with setfacl).

Usage

Mounting Without ACL Manipulation

mount BlockDevice MountPoint

Mounting With ACL Manipulation

mount -o acl BlockDevice MountPoint
-o acl

GFS-specific option to allow manipulating file ACLs.

BlockDevice

Specifies the block device where the GFS file system resides.

MountPoint

Specifies the directory where the GFS file system should be mounted.

Example

In this example, the GFS file system on /dev/vg01/lvol0 is mounted on the /mydata1 directory.

mount /dev/vg01/lvol0 /mydata1

Complete Usage

mount BlockDevice MountPoint -o option

The -o option argument consists of GFS-specific options (refer to Table 3.2, “GFS-Specific Mount Options”) or acceptable standard Linux mount -o options, or a combination of both. Multiple option parameters are separated by a comma and no spaces.

Note

The mount command is a Linux system command. In addition to using GFS-specific options described in this section, you can use other, standard, mount command options (for example, -r). For information about other Linux mount command options, see the Linux mount man page.

Table 3.2, “GFS-Specific Mount Options” describes the available GFS-specific -o option values that can be passed to GFS at mount time.

Option Description
acl Allows manipulating file ACLs. If a file system is mounted without the acl mount option, users are allowed to view ACLs (with getfacl), but are not allowed to set them (with setfacl).
ignore_local_fs
Caution: This option should not be used when GFS file systems are shared.
Forces GFS to treat the file system as a multihost file system. By default, using lock_nolock automatically turns on the localcaching and localflocks flags.
localcaching
Caution: This option should not be used when GFS file systems are shared.
Tells GFS that it is running as a local file system. GFS can then turn on selected optimization capabilities that are not available when running in cluster mode. The localcaching flag is automatically turned on by lock_nolock.
localflocks
Caution: This option should not be used when GFS file systems are shared.
Tells GFS to let the VFS (virtual file system) layer do all flock and fcntl. The localflocks flag is automatically turned on by lock_nolock.
lockproto=LockModuleName Allows the user to specify which locking protocol to use with the file system. If LockModuleName is not specified, the locking protocol name is read from the file system superblock.
locktable=LockTableName For a clustered file system, allows the user to specify which locking table to use with the file system.
oopses_ok

This option allows a GFS node to not panic when an oops occurs. (By default, a GFS node panics when an oops occurs, causing the file system used by that node to stall for other GFS nodes.) A GFS node not panicking when an oops occurs minimizes the failure on other GFS nodes using the file system that the failed node is using. There may be circumstances where you do not want to use this option — for example, when you need more detailed troubleshooting information. Use this option with care.

Note: This option is turned on automatically if lock_nolock locking is specified; however, you can override it by using the ignore_local_fs option.

upgrade Upgrade the on-disk format of the file system so that it can be used by newer versions of GFS.
Table 3.2. GFS-Specific Mount Options


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.