Este conteúdo não está disponível no idioma selecionado.

3.2. Mounting a GFS2 File System


Note

You should always use Pacemaker to manage the GFS2 file system in a production environment rather than manually mounting the file system with a mount command, as this may cause issues at system shutdown as described in Section 3.3, “Unmounting a GFS2 File System”.
Before you can mount a GFS2 file system, the file system must exist (see Section 3.1, “Creating a GFS2 File System”), the volume where the file system exists must be activated, and the supporting clustering and locking systems must be started (see Configuring and Managing a Red Hat Cluster). After those requirements have been met, you can mount the GFS2 file system as you would any Linux file system.
For proper operation of the GFS2 file system, the gfs2-utils package must be installed on all nodes that mount a GFS2 file system. The gfs2-utils package is part of the Resilient Storage channel.
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
GFS2-specific option to allow manipulating file ACLs.
BlockDevice
Specifies the block device where the GFS2 file system resides.
MountPoint
Specifies the directory where the GFS2 file system should be mounted.

Example

In this example, the GFS2 file system on /dev/vg01/lvol0 is mounted on the /mygfs2 directory.
# mount /dev/vg01/lvol0 /mygfs2

Complete Usage

mount BlockDevice MountPoint -o option
The -o option argument consists of GFS2-specific options (see Table 3.2, “GFS2-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 GFS2-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, “GFS2-Specific Mount Options” describes the available GFS2-specific -o option values that can be passed to GFS2 at mount time.

Note

This table includes descriptions of options that are used with local file systems only. Note, however, that as of the Red Hat Enterprise Linux 6 release, Red Hat does not support the use of GFS2 as a single-node file system. Red Hat will continue to support single-node GFS2 file systems for mounting snapshots of cluster file systems (for example, for backup purposes).
Table 3.2. GFS2-Specific Mount Options
OptionDescription
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).
data=[ordered|writeback] When data=ordered is set, the user data modified by a transaction is flushed to the disk before the transaction is committed to disk. This should prevent the user from seeing uninitialized blocks in a file after a crash. When data=writeback mode is set, the user data is written to the disk at any time after it is dirtied; this does not provide the same consistency guarantee as ordered mode, but it should be slightly faster for some workloads. The default value is ordered mode.
ignore_local_fs
Caution: This option should not be used when GFS2 file systems are shared.
Forces GFS2 to treat the file system as a multi-host file system. By default, using lock_nolock automatically turns on the localflocks flag.
localflocks
Caution: This option should not be used when GFS2 file systems are shared.
Tells GFS2 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 Allows the user to specify which locking table to use with the file system.
quota=[off/account/on] Turns quotas on or off for a file system. Setting the quotas to be in the account state causes the per UID/GID usage statistics to be correctly maintained by the file system; limit and warn values are ignored. The default value is off.
errors=panic|withdraw When errors=panic is specified, file system errors will cause a kernel panic. When errors=withdraw is specified, which is the default behavior, file system errors will cause the system to withdraw from the file system and make it inaccessible until the next reboot; in some cases the system may remain running.
discard/nodiscard Causes GFS2 to generate "discard" I/O requests for blocks that have been freed. These can be used by suitable hardware to implement thin provisioning and similar schemes.
barrier/nobarrier Causes GFS2 to send I/O barriers when flushing the journal. The default value is on. This option is automatically turned off if the underlying device does not support I/O barriers. Use of I/O barriers with GFS2 is highly recommended at all times unless the block device is designed so that it cannot lose its write cache content (for example, if it is on a UPS or it does not have a write cache).
quota_quantum=secs Sets the number of seconds for which a change in the quota information may sit on one node before being written to the quota file. This is the preferred way to set this parameter. The value is an integer number of seconds greater than zero. The default is 60 seconds. Shorter settings result in faster updates of the lazy quota information and less likelihood of someone exceeding their quota. Longer settings make file system operations involving quotas faster and more efficient.
statfs_quantum=secs Setting statfs_quantum to 0 is the preferred way to set the slow version of statfs. The default value is 30 secs which sets the maximum time period before statfs changes will be synced to the master statfs file. This can be adjusted to allow for faster, less accurate statfs values or slower more accurate values. When this option is set to 0, statfs will always report the true values.
statfs_percent=value Provides a bound on the maximum percentage change in the statfs information on a local basis before it is synced back to the master statfs file, even if the time period has not expired. If the setting of statfs_quantum is 0, then this setting is ignored.
Red Hat logoGithubRedditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja oBlog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

© 2024 Red Hat, Inc.