Blame gfs2/man/gfs2.5.bz1818983-gfs2_5_Update_some_mentions_of_gfs2_tool

Packit 269ba8
.TH gfs2 5
Packit 269ba8
Packit 269ba8
.SH NAME
Packit 269ba8
gfs2 \- GFS2 reference guide
Packit 269ba8
Packit 269ba8
.SH SYNOPSIS
Packit 269ba8
Overview of the GFS2 filesystem
Packit 269ba8
Packit 269ba8
.SH DESCRIPTION
Packit 269ba8
Packit 269ba8
GFS2 is a clustered filesystem, designed for sharing data between 
Packit 269ba8
multiple nodes
Packit 269ba8
connected to a common shared storage device. It can also be used as a
Packit 269ba8
local filesystem on a single node, however since the design is aimed
Packit 269ba8
at clusters, that will usually result in lower performance than using
Packit 269ba8
a filesystem designed specifically for single node use.
Packit 269ba8
Packit 269ba8
GFS2 is a journaling filesystem and one journal is required for each node
Packit 269ba8
that will mount the filesystem. The one exception to that is spectator
Packit 269ba8
mounts which are equivalent to mounting a read-only block device and as
Packit 269ba8
such can neither recover a journal or write to the filesystem, so do not
Packit 269ba8
require a journal assigned to them.
Packit 269ba8
Packit 269ba8
The GFS2 documentation has been split into a number of sections:
Packit 269ba8
Packit 269ba8
\fBmkfs.gfs2\fP(8) Create a GFS2 filesystem
Packit 269ba8
.br
Packit 269ba8
\fBfsck.gfs2\fP(8) The GFS2 filesystem checker
Packit 269ba8
.br
Packit 269ba8
\fBgfs2_grow\fP(8) Growing a GFS2 filesystem
Packit 269ba8
.br
Packit 269ba8
\fBgfs2_jadd\fP(8) Adding a journal to a GFS2 filesystem
Packit 269ba8
.br
Packit 269ba8
\fBtunegfs2\fP(8) Tool to manipulate GFS2 superblocks
Packit 269ba8
.br
Packit 269ba8
\fBgfs2_edit\fP(8) A GFS2 debug tool (use with caution)
Packit 269ba8
Packit 269ba8
.SH MOUNT OPTIONS
Packit 269ba8
Packit 269ba8
.TP
Packit 269ba8
\fBlockproto=\fP\fILockProtoName\fR
Packit 269ba8
This specifies which inter-node lock protocol is used by the GFS2 filesystem
Packit 269ba8
for this mount, overriding the default lock protocol name stored in the
Packit 269ba8
filesystem's on-disk superblock.
Packit 269ba8
Packit 269ba8
The \fILockProtoName\fR must be one of the supported locking protocols,
Packit 269ba8
currently these are \fIlock_nolock\fR and \fIlock_dlm\fR.
Packit 269ba8
Packit 269ba8
The default lock protocol name is written to disk initially when creating the
Packit 269ba8
filesystem with \fBmkfs.gfs2\fP(8), -p option.  It can be changed on-disk by
Packit 269ba8
using the \fBgfs2_tool\fP(8) utility's \fBsb proto\fP command.
Packit 269ba8
Packit 269ba8
The \fBlockproto\fP mount option should be used only under special
Packit 269ba8
circumstances in which you want to temporarily use a different lock protocol
Packit 269ba8
without changing the on-disk default. Using the incorrect lock protocol
Packit 269ba8
on a cluster filesystem mounted from more than one node will almost
Packit 269ba8
certainly result in filesystem corruption.
Packit 269ba8
.TP
Packit 269ba8
\fBlocktable=\fP\fILockTableName\fR
Packit 269ba8
This specifies the identity of the cluster and of the filesystem for this
Packit 269ba8
mount, overriding the default cluster/filesystem identify stored in the
Packit 269ba8
filesystem's on-disk superblock.  The cluster/filesystem name is recognized
Packit 269ba8
globally throughout the cluster, and establishes a unique namespace for
Packit 269ba8
the inter-node locking system, enabling the mounting of multiple GFS2
Packit 269ba8
filesystems.
Packit 269ba8
Packit 269ba8
The format of \fILockTableName\fR is lock-module-specific.  For
Packit 269ba8
\fIlock_dlm\fR, the format is \fIclustername:fsname\fR.  For
Packit 269ba8
\fIlock_nolock\fR, the field is ignored.
Packit 269ba8
Packit 269ba8
The default cluster/filesystem name is written to disk initially when creating
Packit 269ba8
the filesystem with \fBmkfs.gfs2\fP(8), -t option.  It can be changed on-disk
Packit 269ba8
by using the \fBgfs2_tool\fP(8) utility's \fBsb table\fP command.
Packit 269ba8
Packit 269ba8
The \fBlocktable\fP mount option should be used only under special
Packit 269ba8
circumstances in which you want to mount the filesystem in a different cluster,
Packit 269ba8
or mount it as a different filesystem name, without changing the on-disk
Packit 269ba8
default.
Packit 269ba8
.TP
Packit 269ba8
\fBlocalflocks\fP
Packit 269ba8
This flag tells GFS2 that it is running as a local (not clustered) filesystem,
Packit 269ba8
so it can allow the kernel VFS layer to do all flock and fcntl file locking.
Packit 269ba8
When running in cluster mode, these file locks require inter-node locks,
Packit 269ba8
and require the support of GFS2.  When running locally, better performance
Packit 269ba8
is achieved by letting VFS handle the whole job.
Packit 269ba8
Packit 269ba8
This is turned on automatically by the lock_nolock module.
Packit 269ba8
.TP
Packit 269ba8
\fBerrors=\fP\fI[panic|withdraw]\fR
Packit 269ba8
Setting errors=panic causes GFS2 to oops when encountering an error that
Packit 269ba8
would otherwise cause the
Packit 269ba8
mount to withdraw or print an assertion warning. The default setting
Packit 269ba8
is errors=withdraw. This option should not be used in a production system.
Packit 269ba8
It replaces the earlier \fBdebug\fP option on kernel versions 2.6.31 and
Packit 269ba8
above.
Packit 269ba8
.TP
Packit 269ba8
\fBacl\fP
Packit 269ba8
Enables POSIX Access Control List \fBacl\fP(5) support within GFS2.
Packit 269ba8
.TP
Packit 269ba8
\fBspectator\fP
Packit 269ba8
Mount this filesystem using a special form of read-only mount.  The mount
Packit 269ba8
does not use one of the filesystem's journals. The node is unable to
Packit 269ba8
recover journals for other nodes.
Packit 269ba8
.TP
Packit 269ba8
\fBnorecovery\fP
Packit 269ba8
A synonym for spectator
Packit 269ba8
.TP
Packit 269ba8
\fBsuiddir\fP
Packit 269ba8
Sets owner of any newly created file or directory to be that of parent
Packit 269ba8
directory, if parent directory has S_ISUID permission attribute bit set.
Packit 269ba8
Sets S_ISUID in any new directory, if its parent directory's S_ISUID is set.
Packit 269ba8
Strips all execution bits on a new file, if parent directory owner is different
Packit 269ba8
from owner of process creating the file.  Set this option only if you know
Packit 269ba8
why you are setting it.
Packit 269ba8
.TP
Packit 269ba8
\fBquota=\fP\fI[off/account/on]\fR
Packit 269ba8
Turns quotas on or off for a filesystem.  Setting the quotas to be in
Packit 269ba8
the "account" state causes the per UID/GID usage statistics to be
Packit 269ba8
correctly maintained by the filesystem, limit and warn values are
Packit 269ba8
ignored.  The default value is "off".
Packit 269ba8
.TP
Packit 269ba8
\fBdiscard\fP
Packit 269ba8
Causes GFS2 to generate "discard" I/O requests for blocks which have
Packit 269ba8
been freed. These can be used by suitable hardware to implement
Packit 269ba8
thin-provisioning and similar schemes. This feature is supported
Packit 269ba8
in kernel version 2.6.30 and above.
Packit 269ba8
.TP
Packit 269ba8
\fBbarrier\fP
Packit 269ba8
This option, which defaults to on, causes GFS2 to send I/O barriers
Packit 269ba8
when flushing the journal. The option is automatically turned off
Packit 269ba8
if the underlying device does not support I/O barriers. We highly
Packit 269ba8
recommend the use of I/O barriers with GFS2 at all times unless
Packit 269ba8
the block device is designed so that it cannot lose its write cache
Packit 269ba8
content (e.g. its on a UPS, or it doesn't have a write cache)
Packit 269ba8
.TP
Packit 269ba8
\fBcommit=\fP\fIsecs\fR
Packit 269ba8
This is similar to the ext3 \fBcommit=\fP option in that it sets
Packit 269ba8
the maximum number of seconds between journal commits if there is
Packit 269ba8
dirty data in the journal. The default is 60 seconds. This option
Packit 269ba8
is only provided in kernel versions 2.6.31 and above.
Packit 269ba8
.TP
Packit 269ba8
\fBdata=\fP\fI[ordered|writeback]\fR
Packit 269ba8
When data=ordered is set, the user data modified by a transaction is
Packit 269ba8
flushed to the disk before the transaction is committed to disk.  This
Packit 269ba8
should prevent the user from seeing uninitialized blocks in a file
Packit 269ba8
after a crash.  Data=writeback mode writes the user data to the disk
Packit 269ba8
at any time after it's dirtied.  This doesn't provide the same
Packit 269ba8
consistency guarantee as ordered mode, but it should be slightly
Packit 269ba8
faster for some workloads.  The default is ordered mode.
Packit 269ba8
.TP
Packit 269ba8
\fBmeta\fP
Packit 269ba8
This option results in selecting the meta filesystem root rather than
Packit 269ba8
the normal filesystem root. This option is normally only used by
Packit 269ba8
the GFS2 utility functions. Altering any file on the GFS2 meta filesystem
Packit 269ba8
may render the filesystem unusable, so only experts in the GFS2
Packit 269ba8
on-disk layout should use this option.
Packit 269ba8
.TP
Packit 269ba8
\fBquota_quantum=\fP\fIsecs\fR
Packit 269ba8
This sets the number of seconds for which a change in the quota
Packit 269ba8
information may sit on one node before being written to the quota
Packit 269ba8
file. This is the preferred way to set this parameter. The value
Packit 269ba8
is an integer number of seconds greater than zero. The default is
Packit 269ba8
60 seconds. Shorter settings result in faster updates of the lazy
Packit 269ba8
quota information and less likelihood of someone exceeding their
Packit 269ba8
quota. Longer settings make filesystem operations involving quotas
Packit 269ba8
faster and more efficient.
Packit 269ba8
.TP
Packit 269ba8
\fBstatfs_quantum=\fP\fIsecs\fR
Packit 269ba8
Setting statfs_quantum to 0 is the preferred way to set the slow version
Packit 269ba8
of statfs. The default value is 30 secs which sets the maximum time
Packit 269ba8
period before statfs changes will be syned to the master statfs file.
Packit 269ba8
This can be adjusted to allow for faster, less accurate statfs values
Packit 269ba8
or slower more accurate values. When set to 0, statfs will always
Packit 269ba8
report the true values.
Packit 269ba8
.TP
Packit 269ba8
\fBstatfs_percent=\fP\fIvalue\fR
Packit 269ba8
This setting provides a bound on the maximum percentage change in
Packit 269ba8
the statfs information on a local basis before it is synced back
Packit 269ba8
to the master statfs file, even if the time period has not
Packit 269ba8
expired. If the setting of statfs_quantum is 0, then this setting
Packit 269ba8
is ignored.
Packit 269ba8
.TP
Packit 269ba8
\fBrgrplvb\fP
Packit 269ba8
This flag tells gfs2 to look for information about a resource group's free
Packit 269ba8
space and unlinked inodes in its glock lock value block. This keeps gfs2 from
Packit 269ba8
having to read in the resource group data from disk, speeding up allocations in
Packit 269ba8
some cases.  This option was added in the 3.6 Linux kernel. Prior to this
Packit 269ba8
kernel, no information was saved to the resource group lvb. \fBNote:\fP To
Packit 269ba8
safely turn on this option, all nodes mounting the filesystem must be running
Packit 269ba8
at least a 3.6 Linux kernel. If any nodes had previously mounted the filesystem
Packit 269ba8
using older kernels, the filesystem must be unmounted on all nodes before it
Packit 269ba8
can be mounted with this option enabled. This option does not need to be
Packit 269ba8
enabled on all nodes using a filesystem.
Packit 269ba8
.TP
Packit 269ba8
\fBloccookie\fP
Packit 269ba8
This flag tells gfs2 to use location based readdir cookies, instead of its
Packit 269ba8
usual filename hash readdir cookies.  The filename hash cookies are not
Packit 269ba8
guaranteed to be unique, and as the number of files in a directory increases,
Packit 269ba8
so does the likelihood of a collision.  NFS requires readdir cookies to be
Packit 269ba8
unique, which can cause problems with very large directories (over 100,000
Packit 269ba8
files). With this flag set, gfs2 will try to give out location based cookies.
Packit 269ba8
Since the cookie is 31 bits, gfs2 will eventually run out of unique cookies,
Packit 269ba8
and will fail back to using hash cookies. The maximum number of files that
Packit 269ba8
could have unique location cookies assuming perfectly even hashing and names of
Packit 269ba8
8 or fewer characters is 1,073,741,824. An average directory should be able to
Packit 269ba8
give out well over half a billion location based cookies. This option was added
Packit 269ba8
in the 4.5 Linux kernel. Prior to this kernel, gfs2 did not add directory
Packit 269ba8
entries in a way that allowed it to use location based readdir cookies.
Packit 269ba8
\fBNote:\fP To safely turn on this option, all nodes mounting the filesystem
Packit 269ba8
must be running at least a 4.5 Linux kernel. If this option is only enabled on
Packit 269ba8
some of the nodes mounting a filesystem, the cookies returned by nodes using
Packit 269ba8
this option will not be valid on nodes that are not using this option, and vice
Packit 269ba8
versa.  Finally, when first enabling this option on a filesystem that had been
Packit 269ba8
previously mounted without it, you must make sure that there are no outstanding
Packit 269ba8
cookies being cached by other software, such as NFS.
Packit 269ba8
Packit 269ba8
.SH SETUP
Packit 269ba8
Packit 269ba8
GFS2 clustering is driven by the dlm, which depends on dlm_controld to provide
Packit 269ba8
clustering from userspace.  dlm_controld clustering is built on corosync
Packit 269ba8
cluster/group membership and messaging. GFS2 also requires clustered lvm which
Packit 269ba8
is provided by lvmlockd or, previously, clvmd. Refer to the documentation for
Packit 269ba8
each of these components and ensure that they are configured before setting up
Packit 269ba8
a GFS2 filesystem. Also refer to your distribution's documentation for any
Packit 269ba8
specific support requirements.
Packit 269ba8
Packit 269ba8
Ensure that gfs2-utils is installed on all nodes which mount the filesystem as
Packit 269ba8
it provides scripts required for correct withdraw event response.
Packit 269ba8
Packit 269ba8
.B 1. Create the gfs2 filesystem
Packit 269ba8
Packit 269ba8
mkfs.gfs2 -p lock_dlm -t cluster_name:fs_name -j num /path/to/storage
Packit 269ba8
Packit 269ba8
The cluster_name must match the name configured in corosync (and thus dlm).
Packit 269ba8
The fs_name must be a unique name for the filesystem in the cluster.
Packit 269ba8
The -j option is the number of journals to create; there must
Packit 269ba8
be one for each node that will mount the filesystem.
Packit 269ba8
Packit 269ba8
.PP
Packit 269ba8
.B 2. Mount the gfs2 filesystem
Packit 269ba8
Packit 269ba8
If you are using a clustered resource manager, see its documentation for
Packit 269ba8
enabling a gfs2 filesystem resource. Otherwise, run:
Packit 269ba8
Packit 269ba8
mount /path/to/storage /mountpoint
Packit 269ba8
Packit 269ba8
Run "dlm_tool ls" to verify the nodes that have each fs mounted.
Packit 269ba8
Packit 269ba8
.PP
Packit 269ba8
.B 3. Shut down
Packit 269ba8
Packit 269ba8
If you are using a clustered resource manager, see its documentation for
Packit 269ba8
disabling a gfs2 filesystem resource. Otherwise, run:
Packit 269ba8
Packit 269ba8
umount -a -t gfs2
Packit 269ba8
Packit 269ba8
.PP
Packit 269ba8
.SH SEE ALSO
Packit 269ba8
Packit 269ba8
\fBmount\fP(8) and \fBumount\fP(8) for general mount information,
Packit 269ba8
\fBchmod\fP(1) and \fBchmod\fP(2) for access permission flags,
Packit 269ba8
\fBacl\fP(5) for access control lists,
Packit 269ba8
\fBlvm\fP(8) for volume management,
Packit 269ba8
\fBdlm_controld\fP(8),
Packit 269ba8
\fBdlm_tool\fP(8),
Packit 269ba8
\fBdlm.conf\fP(5),
Packit 269ba8
\fBcorosync\fP(8),
Packit 269ba8
\fBcorosync.conf\fP(5),