1.4.2. Additional Differences Between GFS and GFS2
This section summarizes the additional differences in GFS and GFS2 administration that are not described in Section 1.4.1, “GFS2 Command Names”.
Context-Dependent Path Names
GFS2 file systems do not provide support for context-dependent path names, which allow you to create symbolic links that point to variable destination files or directories. For this functionality in GFS2, you can use the
bind
option of the mount
command. For information on bind mounts and context-dependent pathnames in GFS2, see Section 4.12, “Bind Mounts and Context-Dependent Path Names”.
gfs2.ko Module
The kernel module that implements the GFS file system is
gfs.ko
. The kernel module that implements the GFS2 file system is gfs2.ko
.
Enabling Quota Enforcement in GFS2
In GFS2 file systems, quota enforcement is disabled by default and must be explicitly enabled. For information on enabling and disabling quota enforcement, see Section 4.5, “GFS2 Quota Management”.
Data Journaling
GFS2 file systems support the use of the
chattr
command to set and clear the j
flag on a file or directory. Setting the +j
flag on a file enables data journaling on that file. Setting the +j
flag on a directory means "inherit jdata", which indicates that all files and directories subsequently created in that directory are journaled. Using the chattr
command is the preferred way to enable and disable data journaling on a file.
Adding Journals Dynamically
In GFS file systems, journals are embedded metadata that exists outside of the file system, making it necessary to extend the size of the logical volume that contains the file system before adding journals. In GFS2 file systems, journals are plain (though hidden) files. This means that for GFS2 file systems, journals can be dynamically added as additional servers mount a file system, as long as space remains on the file system for the additional journals. For information on adding journals to a GFS2 file system, see Section 4.7, “Adding Journals to a File System”.
atime_quantum parameter removed
The GFS2 file system does not support the
atime_quantum
tunable parameter, which can be used by the GFS file system to specify how often atime
updates occur. In its place GFS2 supports the relatime
and noatime
mount options. The relatime
mount option is recommended to achieve similar behavior to setting the atime_quantum
parameter in GFS.
The data= option of the mount command
When mounting GFS2 file systems, you can specify the
data=ordered
or data=writeback
option of the mount
. 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
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 is ordered
mode.
The gfs2_tool command
The
gfs2_tool
command supports a different set of options for GFS2 than the gfs_tool
command supports for GFS:
- The
gfs2_tool
command supports ajournals
parameter that prints out information about the currently configured journals, including how many journals the file system contains. - The
gfs2_tool
command does not support thecounters
flag, which thegfs_tool
command uses to display GFS statistics. - The
gfs2_tool
command does not support theinherit_jdata
flag. To flag a directory as "inherit jdata", you can set thejdata
flag on the directory or you can use thechattr
command to set the+j
flag on the directory. Using thechattr
command is the preferred way to enable and disable data journaling on a file.
Note
As of the Red Hat Enterprise Linux 6.2 release, GFS2 supports the
tunegfs2
command, which replaces some of the features of the gfs2_tool
command. For further information, refer to the tunegfs2
(8) man page. The settune
and gettune
functions of the gfs2_tool
command have been replaced by command line options of the mount
command, which allows them to be set by means of the fstab
file when required.
The gfs2_edit command
The
gfs2_edit
command supports a different set of options for GFS2 than the gfs_edit
command supports for GFS. For information on the specific options each version of the command supports, see the gfs2_edit
and gfs_edit
man pages.