---
name: "gfs2_mount"
section: "8"
platform: "linux"
package: "gfs2-tools"
version: "2.20081102-1+lenny1"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/gfs2_mount"
---

# gfs2\_mount(8)

GFS2 mount options

## NAME

gfs2\_mount - GFS2 mount options

## SYNOPSIS

**mount** \[*StandardMountOptions*\] **-t** gfs2 *DEVICE* *MOUNTPOINT* **-o** \[GFS2Option1,GFS2Option2,GFS2OptionX...\]

## DESCRIPTION

GFS2 may be used as a local (single computer) filesystem, but its real purpose is in clusters, where multiple computers (nodes) share a common storage device.

Above is the format typically used to mount a GFS2 filesystem, using the [**mount**(8)](/mount/8.md) command.  The *device* may be any block device on which you have created a GFS2 filesystem.  Examples include a single disk partition (e.g. /dev/sdb3), a loopback device, a device exported from another node (e.g. an iSCSI device or a [**gnbd**(8)](/gnbd/8.md) device), or a logical volume (typically comprised of a number of individual disks).

*device* does not necessarily need to match the device name as seen on another node in the cluster, nor does it need to be a logical volume.  However, the use of a cluster-aware volume manager such as CLVM2 (see [**lvm**(8)](/lvm/8.md)) will guarantee that the managed devices are named identically on each node in a cluster (for much easier management), and will allow you to configure a very large volume from multiple storage units (e.g. disk drives).

*device* must make the entire filesystem storage area visible to the computer.  That is, you cannot mount different parts of a single filesystem on different computers.  Each computer must see an entire filesystem.  You may, however, mount several GFS2 filesystems if you want to distribute your data storage in a controllable way.

*mountpoint* is the same as *dir* in the [**mount**(8)](/mount/8.md) man page.

This man page describes GFS2-specific options that can be passed to the GFS2  file system at mount time, using the **-o** flag.  There are many other **-o** options handled by the generic mount command [**mount**(8)](/mount/8.md). However, the options described below are specifically for GFS2, and are not interpreted by the mount command nor by the kernel's Virtual File System.  GFS2 and non-GFS2 options may be intermingled after the **-o**, separated by commas (but no spaces).

As an alternative to mount command line options, you may send mount options to gfs2 using "gfs2\_tool margs" (after loading the gfs2 kernel module, but before mounting GFS2).  For example, you may need to do this when working from an initial ramdisk [**initrd**(4)](/initrd/4.md).  The options are restricted to the ones described on this man page (no general [**mount**(8)](/mount/8.md) options will be recognized), must not be preceded by -o, and must be separated by commas (no spaces).  Example:

\# gfs2\_tool margs "lockproto=lock\_nolock,ignore\_local\_fs"

Options loaded via "gfs2\_tool margs" have a lifetime of only one GFS2 mount.  If you wish to mount another GFS2 filesystem, you must set another group of options with "gfs2\_tool margs".

The options debug, acl, quota, suiddir, and data can be changed after mount using the "mount -o remount,option /mountpoint" command. The options debug, acl, and suiddir support the "no" prefix.  For example, "noacl" turns off what "acl" turns on.

If you have trouble mounting GFS2, check the syslog (e.g. /var/log/messages) for specific error messages.

## OPTIONS

- **lockproto=***LockModuleName*

  This specifies which inter-node lock protocol is used by the GFS2 filesystem for this mount, overriding the default lock protocol name stored in the filesystem's on-disk superblock.

  The *LockModuleName* must be an exact match of the protocol name presented by the lock module when it registers with the lock harness.  Traditionally, this matches the .o filename of the lock module, e.g. *lock\_dlm*, or *lock\_nolock*.

  The default lock protocol name is written to disk initially when creating the filesystem with [**gfs2\_mkfs**(8)](/gfs2_mkfs/8.md), -p option.  It can be changed on-disk by using the [**gfs2\_tool**(8)](/gfs2_tool/8.md) utility's **sb proto** command.

  The **lockproto** mount option should be used only under special circumstances in which you want to temporarily use a different lock protocol without changing the on-disk default.

- **locktable=***LockTableName*

  This specifies the identity of the cluster and of the filesystem for this mount, overriding the default cluster/filesystem identify stored in the filesystem's on-disk superblock.  The cluster/filesystem name is recognized globally throughout the cluster, and establishes a unique namespace for the inter-node locking system, enabling the mounting of multiple GFS2 filesystems.

  The format of *LockTableName* is lock-module-specific.  For lock\_dlm, the format is *clustername:fsname*.  For lock\_nolock, the field is ignored.

  The default cluster/filesystem name is written to disk initially when creating the filesystem with [**gfs2\_mkfs**(8)](/gfs2_mkfs/8.md), -t option.  It can be changed on-disk by using the [**gfs2\_tool**(8)](/gfs2_tool/8.md) utility's **sb table** command.

  The **locktable** mount option should be used only under special circumstances in which you want to mount the filesystem in a different cluster, or mount it as a different filesystem name, without changing the on-disk default.

- **localcaching**

  This flag tells GFS2 that it is running as a local (not clustered) filesystem, so it can turn on some block caching optimizations that can't be used when running in cluster mode.

  This is turned on automatically by the lock\_nolock module, but can be overridden by using the **ignore\_local\_fs** option.

- **localflocks**

  This flag tells GFS2 that it is running as a local (not clustered) filesystem, so it can allow the kernel VFS layer to do all flock and fcntl file locking. When running in cluster mode, these file locks require inter-node locks, and require the support of GFS2.  When running locally, better performance is achieved by letting VFS handle the whole job.

  This is turned on automatically by the lock\_nolock module, but can be overridden by using the **ignore\_local\_fs** option.

- **debug**

  Causes GFS2 to oops when encountering an error that would cause the mount to withdraw or print an assertion warning.  This option should probably not be used in a production system.

- **ignore\_local\_fs**

  By default, using the nolock lock module automatically turns on the **localcaching** and **localflocks** optimizations.  **ignore\_local\_fs** forces GFS2 to treat the filesystem as if it were a multihost (clustered) filesystem, with **localcaching** and **localflocks** optimizations turned off.

- **upgrade**

  This flag tells GFS2 to upgrade the filesystem's on-disk format to the version supported by the current GFS2 software installation on this computer. If you try to mount an old-version disk image, GFS2 will notify you via a syslog message that you need to upgrade.  Try mounting again, using the **-o upgrade** option.  When upgrading, only one node may mount the GFS2 filesystem.

- **num\_glockd=***Number*

  Tunes GFS2 to alleviate memory pressure when rapidly acquiring many locks (e.g. several processes scanning through huge directory trees).  GFS2' glockd kernel daemon cleans up memory for no-longer-needed glocks.  Multiple instances of the daemon clean up faster than a single instance.  The default value is one daemon, with a maximum of 16.  Since this option was introduced, other methods of rapid cleanup have been developed within GFS2, so this option may go away in the future.

- **acl**

  Enables POSIX Access Control List [**acl**(5)](/acl/5.md) support within GFS2.

- **spectator**

  Mount this filesystem using a special form of read-only mount.  The mount does not use one of the filesystem's journals.

- **suiddir**

  Sets owner of any newly created file or directory to be that of parent directory, if parent directory has S\_ISUID permission attribute bit set. Sets S\_ISUID in any new directory, if its parent directory's S\_ISUID is set. Strips all execution bits on a new file, if parent directory owner is different from owner of process creating the file.  Set this option only if you know why you are setting it.

- **quota=***\[off/account/on\]*

  Turns quotas on or off for a filesystem.  Setting the quotas to be in the "account" state causes the per UID/GID usage statistics to be correctly maintained by the filesystem, limit and warn values are ignored.  The default value is "off".

- **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.  Data=writeback mode writes the user data to the disk at any time after it's dirtied.  This doesn't provide the same consistency guarantee as ordered mode, but it should be slightly faster for some workloads.  The default is ordered mode.

## LINKS

- http://sources.redhat.com/cluster

  \-- home site of GFS2

- http://www.suse.de/~agruen/acl/linux-acls/

  \-- good writeup on ACL support in Linux

## SEE ALSO

[**gfs2**(8)](/gfs2/8.md),  [**mount**(8)](/mount/8.md) for general mount options, [**chmod**(1)](/chmod/1.md) and [**chmod**(2)](/chmod/2.md) for access permission flags, [**acl**(5)](/acl/5.md) for access control lists, [**lvm**(8)](/lvm/8.md) for volume management, [**ccs**(7)](/ccs/7.md) for cluster management, [**umount**(8)](/umount/8.md), [**initrd**(4)](/initrd/4.md).
