104
Chapter 9. Managing GFS
9.7.2.2. Example
In this example, the command sets the
directio
flag on the file named
datafile
in directory
/gfs1/
.
gfs_tool setflag directio /gfs1/datafile
9.7.3. GFS Directory Attribute
The
gfs_tool
command can be used to assign a direct I/O attribute flag,
inherit_directio
, to a
GFS directory. Enabling the
inherit_directio
flag on a directory causes all newly created regular
files in that directory to automatically inherit the
directio
flag. Also, the
inherit_directio
flag
is inherited by any new subdirectories created in the directory. The
inherit_directio
flag can also
be cleared.
9.7.3.1. Usage
Setting the
inherit_directio
flag
gfs_tool setflag
inherit_directio
Directory
Setting the
inherit_directio
flag
gfs_tool clearflag
inherit_directio
Directory
Directory
Specifies the directory where the
inherit_directio
flag is set.
9.7.3.2. Example
In this example, the command sets the
inherit_directio
flag on the directory named
/gfs1/data/
.
gfs_tool setflag inherit_directio /gfs1/data/
9.8. Data Journaling
Ordinarily, GFS writes only metadata to its journal. File contents are subsequently written to disk by
the kernel’s periodic sync that flushes file system buffers. An
fsync()
call on a file causes the file’s
data to be written to disk immediately. The call returns when the disk reports that all data is safely
written.
Data journaling can result in a reduced
fsync()
time, especially for small files, because the file data
is written to the journal in addition to the metadata. An
fsync()
returns as soon as the data is written
to the journal, which can be substantially faster than the time it takes to write the file data to the main
file system.
Applications that rely on
fsync()
to sync file data may see improved performance by using data
journaling. Data journaling can be enabled automatically for any GFS files created in a flagged direc-
Summary of Contents for GFS 6.0 -
Page 1: ...Red Hat GFS 6 0 Administrator s Guide...
Page 8: ......
Page 88: ...74 Chapter 6 Creating the Cluster Configuration System Files...
Page 98: ...84 Chapter 7 Using the Cluster Configuration System...
Page 102: ...88 Chapter 8 Using Clustering and Locking Systems...
Page 128: ...114 Chapter 9 Managing GFS...
Page 134: ...120 Chapter 10 Using the Fencing System...
Page 144: ...130 Chapter 12 Using GFS init d Scripts...
Page 148: ...134 Appendix A Using Red Hat GFS with Red Hat Cluster Suite...
Page 184: ...170 Appendix C Basic GFS Examples...
Page 190: ......